public class PostRequestHelper extends Object
| Constructor and Description |
|---|
PostRequestHelper(String requestURL,
String inCharset,
String outCharset,
boolean useSinglePart)
This constructor initializes a new HTTP POST request with content type is set to multipart/form-data
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFilePart(String fieldName,
byte[] uploadFile,
String fileName,
String contentType)
Adds a upload file section to the request
|
void |
addFormField(String name,
String value)
Adds a form field to the request
|
PostRequestResult |
finish()
Completes the request and receives response from the server.
|
boolean |
isMaskAmp() |
void |
setMaskAmp(boolean maskAmp) |
public PostRequestHelper(String requestURL, String inCharset, String outCharset, boolean useSinglePart) throws IOException
requestURL - charset - useSinglePart - verarbeitungPost - TODOIOExceptionpublic void addFormField(String name, String value)
name - field namevalue - field valuepublic void addFilePart(String fieldName, byte[] uploadFile, String fileName, String contentType) throws IOException
fieldName - name attribute in uploadFile - a File to be uploadedIOExceptionpublic PostRequestResult finish() throws IOException
IOExceptionpublic boolean isMaskAmp()
public void setMaskAmp(boolean maskAmp)
Copyright © 2018 XIMA MEDIA GmbH. All rights reserved.