public static final class MultipartContent.Part
Single part of a multi-part request.
Implementation is not thread-safe.
Constructors
Part()
public Part()
Part(HttpContent content)
public Part(HttpContent content)
Name | Description |
content | HttpContent HTTP content or |
Part(HttpHeaders headers, HttpContent content)
public Part(HttpHeaders headers, HttpContent content)
Name | Description |
headers | HttpHeaders HTTP headers or |
content | HttpContent HTTP content or |
Methods
getContent()
public HttpContent getContent()
Returns the HTTP content or null
for none.
Type | Description |
HttpContent |
getEncoding()
public HttpEncoding getEncoding()
Returns the HTTP encoding or null
for none.
Type | Description |
HttpEncoding |
getHeaders()
public HttpHeaders getHeaders()
Returns the HTTP headers or null
for none.
Type | Description |
HttpHeaders |
setContent(HttpContent content)
public MultipartContent.Part setContent(HttpContent content)
Sets the HTTP content or null
for none.
Name | Description |
content | HttpContent |
Type | Description |
MultipartContent.Part |
setEncoding(HttpEncoding encoding)
public MultipartContent.Part setEncoding(HttpEncoding encoding)
Sets the HTTP encoding or null
for none.
Name | Description |
encoding | HttpEncoding |
Type | Description |
MultipartContent.Part |
setHeaders(HttpHeaders headers)
public MultipartContent.Part setHeaders(HttpHeaders headers)
Sets the HTTP headers or null
for none.
Name | Description |
headers | HttpHeaders |
Type | Description |
MultipartContent.Part |