public interface MultipartBody extends HttpRequest<MultipartBody>, Body
| Modifier and Type | Method and Description |
|---|---|
MultipartBody |
charset(Charset charset)
Set the encoding of the request body
|
MultipartBody |
contentType(String mimeType)
Set the mime-type of the request body
|
MultipartBody |
field(String name,
byte[] bytes,
org.apache.http.entity.ContentType contentType,
String fileName)
Deprecated.
org.apache.http.entity.ContentType will be replaced by a Unirest owned class that behaves similarly
|
MultipartBody |
field(String name,
byte[] bytes,
String fileName)
add a simple field with a name and value
|
MultipartBody |
field(String name,
Collection<?> values)
add a simple field with a name and value
|
MultipartBody |
field(String name,
File file)
add a simple field with a name and value
|
MultipartBody |
field(String name,
File file,
String contentType)
add a simple field with a name and value
|
MultipartBody |
field(String name,
InputStream value,
org.apache.http.entity.ContentType contentType)
Deprecated.
org.apache.http.entity.ContentType will be replaced by a Unirest owned class that behaves similarly
|
MultipartBody |
field(String name,
InputStream stream,
org.apache.http.entity.ContentType contentType,
String fileName)
Deprecated.
org.apache.http.entity.ContentType will be replaced by a Unirest owned class that behaves similarly
|
MultipartBody |
field(String name,
InputStream stream,
String fileName)
add a simple field with a name and value
|
MultipartBody |
field(String name,
String value)
add a simple field with a name and value
|
MultipartBody |
field(String name,
String value,
String contentType)
add a simple field with a name and value
|
MultipartBody |
mode(org.apache.http.entity.mime.HttpMultipartMode value)
Deprecated.
Apache will be made a module in the future.
|
MultipartBody |
mode(String value)
Deprecated.
Apache will be made a module in the future.
|
accept, asBinary, asBinaryAsync, asBinaryAsync, asEmpty, asEmptyAsync, asEmptyAsync, asFile, asFileAsync, asFileAsync, asJson, asJsonAsync, asJsonAsync, asObject, asObject, asObject, asObjectAsync, asObjectAsync, asObjectAsync, asObjectAsync, asObjectAsync, asPaged, asString, asStringAsync, asStringAsync, basicAuth, getBody, getHeaders, getHttpMethod, getUrl, header, headerReplace, headers, queryString, queryString, queryString, responseEncoding, routeParam, thenConsume, thenConsumeAsync, withObjectMapperMultipartBody field(String name, String value)
name: - the Name of the form fieldvalue: - The string value for the fieldMultipartBody field(String name, String value, String contentType)
name: - the Name of the form fieldvalue: - The string value for the fieldcontentType: - the content type of the valueMultipartBody field(String name, Collection<?> values)
name: - the Name of the form fieldvalues: - A collection of values for the same name.MultipartBody field(String name, File file)
name: - the Name of the form fieldfile: - A File object.MultipartBody field(String name, File file, String contentType)
name: - the Name of the form fieldfile: - A File object.contentType: - the content mime-type of the file@Deprecated MultipartBody field(String name, InputStream value, org.apache.http.entity.ContentType contentType)
name: - the Name of the form fieldvalue: - A input streamcontentType: - the content mime-type of the file@Deprecated MultipartBody field(String name, InputStream stream, org.apache.http.entity.ContentType contentType, String fileName)
name: - the Name of the form fieldstream: - A input streamcontentType: - the content mime-type of the filefileName: - the name of the file which will be included in the file part header@Deprecated MultipartBody field(String name, byte[] bytes, org.apache.http.entity.ContentType contentType, String fileName)
name: - the Name of the form fieldbytes: - The raw bytes for the filecontentType: - the content mime-type of the filefileName: - the name of the file which will be included in the file part headerMultipartBody field(String name, InputStream stream, String fileName)
name: - the Name of the form fieldstream: - The raw bytes for the filefileName: - the name of the file which will be included in the file part headerMultipartBody field(String name, byte[] bytes, String fileName)
name: - the Name of the form fieldbytes: - The raw bytes for the filefileName: - the name of the file which will be included in the file part headerMultipartBody charset(Charset charset)
charset - the character set encoding of the bodyMultipartBody contentType(String mimeType)
mimeType - the mime type of the body@Deprecated MultipartBody mode(String value)
value - the string value of the mode@Deprecated MultipartBody mode(org.apache.http.entity.mime.HttpMultipartMode value)
value - the value of the modeCopyright © 2019. All rights reserved.