public final class Multiparts
extends java.lang.Object
Constructor and Description |
---|
Multiparts() |
Modifier and Type | Method and Description |
---|---|
static Multipart.FormData.BodyPart |
createFormDataBodyPart(java.lang.String name,
BodyPartEntity entity)
Creates a BodyPart.
|
static Multipart.FormData.BodyPart |
createFormDataBodyPart(java.lang.String name,
BodyPartEntity entity,
java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams)
Creates a BodyPart.
|
static Multipart.FormData.BodyPart |
createFormDataBodyPart(java.lang.String name,
BodyPartEntity entity,
java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams,
java.util.List<HttpHeader> headers)
Creates a BodyPart.
|
static Multipart.FormData.BodyPart.Strict |
createFormDataBodyPartStrict(java.lang.String name,
HttpEntity.Strict entity)
Creates a BodyPart.Strict.
|
static Multipart.FormData.BodyPart.Strict |
createFormDataBodyPartStrict(java.lang.String name,
HttpEntity.Strict entity,
java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams)
Creates a BodyPart.Strict.
|
static Multipart.FormData.BodyPart.Strict |
createFormDataBodyPartStrict(java.lang.String name,
HttpEntity.Strict entity,
java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams,
java.util.List<HttpHeader> headers)
Creates a BodyPart.Strict.
|
static Multipart.FormData.Strict |
createFormDataFromFields(java.util.Map<java.lang.String,HttpEntity.Strict> fields)
Constructor for `multipart/form-data` content as defined in http://tools.ietf.org/html/rfc2388.
|
static Multipart.FormData |
createFormDataFromParts(Multipart.FormData.BodyPart... parts)
Constructor for `multipart/form-data` content as defined in http://tools.ietf.org/html/rfc2388.
|
static Multipart.FormData |
createFormDataFromPath(java.lang.String name,
ContentType contentType,
java.nio.file.Path path)
Creates a FormData instance that contains a single part backed by the given file.
|
static Multipart.FormData |
createFormDataFromPath(java.lang.String name,
ContentType contentType,
java.nio.file.Path path,
int chunkSize)
Creates a FormData instance that contains a single part backed by the given file.
|
static Multipart.FormData |
createFormDataFromSourceParts(org.apache.pekko.stream.javadsl.Source<Multipart.FormData.BodyPart,? extends java.lang.Object> parts)
Constructor for `multipart/form-data` content as defined in http://tools.ietf.org/html/rfc2388.
|
static Multipart.FormData.BodyPart |
createFormDataPartFromPath(java.lang.String name,
ContentType contentType,
java.nio.file.Path path)
Creates a BodyPart backed by a file that will be streamed using a FileSource.
|
static Multipart.FormData.BodyPart |
createFormDataPartFromPath(java.lang.String name,
ContentType contentType,
java.nio.file.Path path,
int chunkSize)
Creates a BodyPart backed by a file that will be streamed using a FileSource.
|
static Multipart.FormData.Strict |
createStrictFormDataFromParts(Multipart.FormData.BodyPart.Strict... parts)
Constructor for `multipart/form-data` content as defined in http://tools.ietf.org/html/rfc2388.
|
public static Multipart.FormData createFormDataFromParts(Multipart.FormData.BodyPart... parts)
public static Multipart.FormData createFormDataFromSourceParts(org.apache.pekko.stream.javadsl.Source<Multipart.FormData.BodyPart,? extends java.lang.Object> parts)
public static Multipart.FormData.Strict createStrictFormDataFromParts(Multipart.FormData.BodyPart.Strict... parts)
public static Multipart.FormData.Strict createFormDataFromFields(java.util.Map<java.lang.String,HttpEntity.Strict> fields)
public static Multipart.FormData createFormDataFromPath(java.lang.String name, ContentType contentType, java.nio.file.Path path, int chunkSize)
To create an instance with several parts or for multiple files, use `Multiparts.createFormDataFromParts(Multiparts.createFormDataPartFromPath("field1", ...), Multiparts.createFormDataPartFromPath("field2", ...)`
public static Multipart.FormData createFormDataFromPath(java.lang.String name, ContentType contentType, java.nio.file.Path path)
To create an instance with several parts or for multiple files, use `Multiparts.createFormDataFromParts(Multiparts.createFormDataPartFromPath("field1", ...), Multiparts.createFormDataPartFromPath("field2", ...)`
public static Multipart.FormData.BodyPart createFormDataPartFromPath(java.lang.String name, ContentType contentType, java.nio.file.Path path, int chunkSize)
public static Multipart.FormData.BodyPart createFormDataPartFromPath(java.lang.String name, ContentType contentType, java.nio.file.Path path)
public static Multipart.FormData.BodyPart createFormDataBodyPart(java.lang.String name, BodyPartEntity entity)
public static Multipart.FormData.BodyPart createFormDataBodyPart(java.lang.String name, BodyPartEntity entity, java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams)
public static Multipart.FormData.BodyPart createFormDataBodyPart(java.lang.String name, BodyPartEntity entity, java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams, java.util.List<HttpHeader> headers)
public static Multipart.FormData.BodyPart.Strict createFormDataBodyPartStrict(java.lang.String name, HttpEntity.Strict entity)
public static Multipart.FormData.BodyPart.Strict createFormDataBodyPartStrict(java.lang.String name, HttpEntity.Strict entity, java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams)
public static Multipart.FormData.BodyPart.Strict createFormDataBodyPartStrict(java.lang.String name, HttpEntity.Strict entity, java.util.Map<java.lang.String,java.lang.String> additionalDispositionParams, java.util.List<HttpHeader> headers)