Package de.xima.fc.http
Class PostRequestBuilder
java.lang.Object
de.xima.fc.http.PostRequestBuilder
- Direct Known Subclasses:
PostRequestHelper
Deprecated.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
ConstructorsConstructorDescriptionPostRequestBuilder
(String requestURL, String inCharset, String outCharset, boolean useSinglePart) Deprecated.useHttpPostRequestBuilder(String)
insteadPostRequestBuilder
(String requestURL, String inCharset, String outCharset, String basicAuthLogin, String basicAuthPwd, Proxy proxy, String proxyAuthLogin, String proxyAuthPwd, boolean useSinglePart) Deprecated.useHttpPostRequestBuilder(String)
insteadPostRequestBuilder
(String requestURL, String inCharset, String outCharset, Proxy proxy, String proxyAuthLogin, String proxyAuthPwd, boolean useSinglePart) Deprecated.useHttpPostRequestBuilder(String)
instead -
Method Summary
Modifier and TypeMethodDescriptionaddFilePart
(String fieldName, byte[] uploadFile, String fileName, String contentType) Deprecated.Adds a upload file section to the requestaddFormField
(String name, String value) Deprecated.Adds a form field to the requestbuild()
Deprecated.Completes the request and receives response from the server.finish()
Deprecated.usebuild()
, always returnnull
!!!boolean
Deprecated.setMaskAmp
(boolean maskAmp) Deprecated.
-
Constructor Details
-
PostRequestBuilder
@Deprecated public PostRequestBuilder(String requestURL, String inCharset, String outCharset, boolean useSinglePart) throws IOException Deprecated.useHttpPostRequestBuilder(String)
insteadThis 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)
insteadThis 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)
insteadThis 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 Details
-
isMaskAmp
public boolean isMaskAmp()Deprecated. -
setMaskAmp
Deprecated. -
addFormField
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
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.usebuild()
, always returnnull
!!!- Throws:
IOException
-
HttpPostRequestBuilder
instead