public class Mech2RequestMultipart extends Mech2Request
multipart/form-data content-type.| Constructor and Description |
|---|
Mech2RequestMultipart(Mech2 mech2,
org.apache.http.client.utils.URIBuilder uriBuilder,
org.apache.http.client.methods.HttpRequestBase request,
Charset charset)
Do not use this directly.
|
| Modifier and Type | Method and Description |
|---|---|
Mech2RequestMultipart |
addBinaryBody(String name,
byte[] file)
Add binary body from byte array.
|
Mech2RequestMultipart |
addBinaryBody(String name,
File file)
Add binary body from the file.
|
Mech2RequestMultipart |
addBinaryBody(String name,
File file,
org.apache.http.entity.ContentType contentType,
String filename)
Add binary body from the file using specific content-type.
|
Mech2RequestMultipart |
addTextBody(String name,
String text)
Add text body
|
Mech2Result |
execute()
Execute HTTP request.
|
addHeader, addParameter, addQueryParameter, setBody, setBodyJSON, setHeader, setQueryParameterpublic Mech2RequestMultipart addBinaryBody(String name, byte[] file)
name - file - public Mech2RequestMultipart addBinaryBody(String name, File file)
name - file - public Mech2RequestMultipart addBinaryBody(String name, File file, org.apache.http.entity.ContentType contentType, String filename)
name - file - contentType - filename - public Mech2RequestMultipart addTextBody(String name, String text)
name - text - public Mech2Result execute() throws URISyntaxException, IOException
execute in class Mech2RequestURISyntaxExceptionIOExceptionCopyright © 2015. All rights reserved.