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.useHttpPostRequestBuilder
instead- 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 PostRequestBuilder
addFilePart(String fieldName, byte[] uploadFile, String fileName, String contentType)
Deprecated.Adds a upload file section to the requestPostRequestBuilder
addFormField(String name, String value)
Deprecated.Adds a form field to the requestPostRequestResult
build()
Deprecated.Completes the request and receives response from the server.PostRequestResult
finish()
Deprecated.usebuild()
, always returnnull
!!!boolean
isMaskAmp()
Deprecated.PostRequestBuilder
setMaskAmp(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
-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.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
- theProxy
to userproxyAuthLogin
- the login name for the proxyproxyAuthPwd
- the login password for the proxyuseSinglePart
-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.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
- theProxy
to userproxyAuthLogin
- the login name for the proxyproxyAuthPwd
- the login password for the proxyuseSinglePart
-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.
-
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
-
-