Class DefaultHTTPMsgSender

  • All Implemented Interfaces:
    MsgSender

    public class DefaultHTTPMsgSender
    extends BaseHTTPSender
    implements MsgSender
    DefaultHTTPMsgSender sending a byte[] array to a given URL. Created by Philip Vendil on 16/06/16.
    • Constructor Detail

      • DefaultHTTPMsgSender

        public DefaultHTTPMsgSender​(java.lang.String url)
                             throws java.net.MalformedURLException
        Main constructor for POST requests
        Parameters:
        url - the URL to connect to.
        Throws:
        java.net.MalformedURLException - if URL was malformed.
      • DefaultHTTPMsgSender

        public DefaultHTTPMsgSender​(java.lang.String url,
                                    java.lang.String requestType)
                             throws java.net.MalformedURLException
        Main constructor where it is possible to specify request type.
        Parameters:
        url - the URL to connect to.
        requestType - the HTTP request type in upper case (For example POST, GET)
        Throws:
        java.net.MalformedURLException - if URL was malformed.