Class Multiparts


  • public final class Multiparts
    extends java.lang.Object
    Constructors for Multipart instances
    • Constructor Detail

      • Multiparts

        public Multiparts()
    • Method Detail

      • createFormDataFromParts

        public static Multipart.FormData createFormDataFromParts​(Multipart.FormData.BodyPart... parts)
        Constructor for `multipart/form-data` content as defined in http://tools.ietf.org/html/rfc2388. All parts must have distinct names. (This is not verified!)
      • createFormDataFromSourceParts

        public static Multipart.FormData createFormDataFromSourceParts​(akka.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. All parts must have distinct names. (This is not verified!)
      • createStrictFormDataFromParts

        public 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. All parts must have distinct names. (This is not verified!)
      • createFormDataFromFields

        public 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. All parts must have distinct names. (This is not verified!)
      • createFormDataFromPath

        public 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. To create an instance with several parts or for multiple files, use `Multiparts.createFormDataFromParts(Multiparts.createFormDataPartFromPath("field1", ...), Multiparts.createFormDataPartFromPath("field2", ...)`
      • createFormDataFromPath

        public 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. To create an instance with several parts or for multiple files, use `Multiparts.createFormDataFromParts(Multiparts.createFormDataPartFromPath("field1", ...), Multiparts.createFormDataPartFromPath("field2", ...)`
      • createFormDataPartFromPath

        public 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.
      • createFormDataPartFromPath

        public 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.
      • createFormDataBodyPart

        public static Multipart.FormData.BodyPart createFormDataBodyPart​(java.lang.String name,
                                                                         BodyPartEntity entity,
                                                                         java.util.Map<java.lang.String,​java.lang.String> additionalDispositionParams)
        Creates a BodyPart.
      • createFormDataBodyPart

        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)
        Creates a BodyPart.
      • createFormDataBodyPartStrict

        public 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.
      • createFormDataBodyPartStrict

        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)
        Creates a BodyPart.Strict.