public interface MultipartFormData extends UploadData
multipart/form-data
content type.Modifier and Type | Interface and Description |
---|---|
static class |
MultipartFormData.Builder
A builder of
MultipartFormData . |
static interface |
MultipartFormData.Pair
A key-value pair that represents a segment of a multi-part form data.
|
Modifier and Type | Method and Description |
---|---|
default byte[] |
bytes()
Returns an array containing the upload data bytes of the associated URL request.
|
default ContentType |
contentType()
Returns the content type of this upload data as specified in the
Content-Type header. |
default java.util.List<MultipartFormData.Pair> |
data()
Returns an immutable list of the key-value pairs each representing a segment of a multi-part
form data or an empty list if the form does not contain any data.
|
static MultipartFormData.Builder |
newBuilder() |
static MultipartFormData.Builder newBuilder()
default java.util.List<MultipartFormData.Pair> data()
default byte[] bytes()
UploadData
If the upload data is constructed manually and is not associated with a URL request, returns an empty array.
bytes
in interface UploadData
default ContentType contentType()
UploadData
Content-Type
header.
If the upload data is constructed manually, the Content-Type
header will be
created after it is passed to the Chromium engine. Thus, the returned ContentType
object will not contain meaningful values in this case.
contentType
in interface UploadData