Class PostRequestBuilder

    • Constructor Detail

      • PostRequestBuilder

        @Deprecated
        public PostRequestBuilder​(String requestURL,
                                  String inCharset,
                                  String outCharset,
                                  boolean useSinglePart)
                           throws IOException
        Deprecated.
        use HttpPostRequestBuilder(String) instead

        This constructor initializes a new HTTP POST request with content type is set to multipart/form-data

        Parameters:
        requestURL - the request URL
        inCharset - the charset to user for the input
        outCharset - the charset to user for the output
        useSinglePart - Boolean if the post should be done as singeplart
        Throws:
        IOException - on errors during the post request
      • PostRequestBuilder

        @Deprecated
        public PostRequestBuilder​(String requestURL,
                                  String inCharset,
                                  String outCharset,
                                  Proxy proxy,
                                  String proxyAuthLogin,
                                  String proxyAuthPwd,
                                  boolean useSinglePart)
                           throws IOException
        Deprecated.
        use HttpPostRequestBuilder(String) instead

        This constructor initializes a new HTTP POST request with content type is set to multipart/form-data and uses a proxy server

        Parameters:
        requestURL - the request URL
        inCharset - the charset to user for the input
        outCharset - the charset to user for the output
        proxy - the Proxy to user
        proxyAuthLogin - the login name for the proxy
        proxyAuthPwd - the login password for the proxy
        useSinglePart - Boolean if the post should be done as singeplart
        Throws:
        IOException - on errors during the post request
      • PostRequestBuilder

        @Deprecated
        public PostRequestBuilder​(String requestURL,
                                  String inCharset,
                                  String outCharset,
                                  String basicAuthLogin,
                                  String basicAuthPwd,
                                  Proxy proxy,
                                  String proxyAuthLogin,
                                  String proxyAuthPwd,
                                  boolean useSinglePart)
                           throws IOException
        Deprecated.
        use HttpPostRequestBuilder(String) instead

        This constructor initializes a new HTTP POST request with content type is set to multipart/form-data and uses a proxy server

        Parameters:
        requestURL - the request URL
        inCharset - the charset to user for the input
        outCharset - the charset to user for the output
        basicAuthLogin - the basicAuth login name
        basicAuthPwd - the basicAuth password
        proxy - the Proxy to user
        proxyAuthLogin - the login name for the proxy
        proxyAuthPwd - the login password for the proxy
        useSinglePart - Boolean if the post should be done as singe part
        Throws:
        IOException - on errors during the post request
    • Method Detail

      • isMaskAmp

        public boolean isMaskAmp()
        Deprecated.
      • addFormField

        public PostRequestBuilder addFormField​(String name,
                                               String value)
        Deprecated.
        Adds a form field to the request
        Parameters:
        name - field name
        value - field value
      • addFilePart

        public PostRequestBuilder addFilePart​(String fieldName,
                                              byte[] uploadFile,
                                              String fileName,
                                              String contentType)
                                       throws IOException
        Deprecated.
        Adds a upload file section to the request
        Parameters:
        fieldName - name attribute in
        uploadFile - a File to be uploaded
        Throws:
        IOException - on errors when writing the file part to the OutputStream
      • build

        public PostRequestResult build()
                                throws IOException
        Deprecated.
        Completes the request and receives response from the server.
        Returns:
        a list of Strings as response in case the server returned status OK, otherwise an exception is thrown.
        Throws:
        IOException - on errors during building the request