public static final class MultipartFormData.Builder
extends java.lang.Object
MultipartFormData.
Builders are created by invoking MultipartFormData.newBuilder(). Each of the setter methods modifies
the state of the builder and returns the same instance. Builders are not thread-safe and
should not be used concurrently from multiple threads without external synchronization.
| Modifier and Type | Method and Description |
|---|---|
MultipartFormData.Builder |
addPair(MultipartFormData.Pair pair)
Sets the key-value pair that represents a segment of the multi-part form data.
|
MultipartFormData |
build()
Returns a new
MultipartFormData instance built from the current state of this
builder. |
public MultipartFormData.Builder addPair(MultipartFormData.Pair pair)
pair - the key-value pair that represents a segment of the multi-part form datapublic MultipartFormData build()
MultipartFormData instance built from the current state of this
builder.MultipartFormData instance