Package de.xima.fc.http
Class PostRequestBuilder
- java.lang.Object
-
- de.xima.fc.http.PostRequestBuilder
-
- Direct Known Subclasses:
PostRequestHelper
@Deprecated public class PostRequestBuilder extends Object
Deprecated.useHttpPostRequestBuilderinstead- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description PostRequestBuilder(String requestURL, String inCharset, String outCharset, boolean useSinglePart)Deprecated.useHttpPostRequestBuilder(String)instead This constructor initializes a new HTTP POST request with content type is set to multipart/form-dataPostRequestBuilder(String requestURL, String inCharset, String outCharset, String basicAuthLogin, String basicAuthPwd, Proxy proxy, String proxyAuthLogin, String proxyAuthPwd, boolean useSinglePart)Deprecated.useHttpPostRequestBuilder(String)instead This constructor initializes a new HTTP POST request with content type is set to multipart/form-data and uses a proxy serverPostRequestBuilder(String requestURL, String inCharset, String outCharset, Proxy proxy, String proxyAuthLogin, String proxyAuthPwd, boolean useSinglePart)Deprecated.useHttpPostRequestBuilder(String)instead This constructor initializes a new HTTP POST request with content type is set to multipart/form-data and uses a proxy server
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PostRequestBuilderaddFilePart(String fieldName, byte[] uploadFile, String fileName, String contentType)Deprecated.Adds a upload file section to the requestPostRequestBuilderaddFormField(String name, String value)Deprecated.Adds a form field to the requestPostRequestResultbuild()Deprecated.Completes the request and receives response from the server.PostRequestResultfinish()Deprecated.usebuild(), always returnnull!!!booleanisMaskAmp()Deprecated.PostRequestBuildersetMaskAmp(boolean maskAmp)Deprecated.
-
-
-
Constructor Detail
-
PostRequestBuilder
@Deprecated public PostRequestBuilder(String requestURL, String inCharset, String outCharset, boolean useSinglePart) throws IOException
Deprecated.useHttpPostRequestBuilder(String)instead This constructor initializes a new HTTP POST request with content type is set to multipart/form-data- Parameters:
requestURL- the request URLinCharset- the charset to user for the inputoutCharset- the charset to user for the outputuseSinglePart-Booleanif 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.useHttpPostRequestBuilder(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 URLinCharset- the charset to user for the inputoutCharset- the charset to user for the outputproxy- theProxyto userproxyAuthLogin- the login name for the proxyproxyAuthPwd- the login password for the proxyuseSinglePart-Booleanif 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.useHttpPostRequestBuilder(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 URLinCharset- the charset to user for the inputoutCharset- the charset to user for the outputbasicAuthLogin- the basicAuth login namebasicAuthPwd- the basicAuth passwordproxy- theProxyto userproxyAuthLogin- the login name for the proxyproxyAuthPwd- the login password for the proxyuseSinglePart-Booleanif the post should be done as singe part- Throws:
IOException- on errors during the post request
-
-
Method Detail
-
isMaskAmp
public boolean isMaskAmp()
Deprecated.
-
setMaskAmp
public PostRequestBuilder setMaskAmp(boolean maskAmp)
Deprecated.
-
addFormField
public PostRequestBuilder addFormField(String name, String value)
Deprecated.Adds a form field to the request- Parameters:
name- field namevalue- 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 inuploadFile- a File to be uploaded- Throws:
IOException- on errors when writing the file part to theOutputStream
-
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
-
finish
@Deprecated public PostRequestResult finish() throws IOException
Deprecated.usebuild(), always returnnull!!!- Throws:
IOException
-
-