Class Multipart.FormData

java.lang.Object
org.apache.pekko.http.scaladsl.model.Multipart.FormData
All Implemented Interfaces:
Multipart, Multipart.FormData, Multipart
Direct Known Subclasses:
Multipart.FormData$.Strict
Enclosing interface:
Multipart

public abstract static class Multipart.FormData extends Object implements Multipart, Multipart.FormData
Model for multipart/form-data content as defined in https://www.rfc-editor.org/rfc/rfc7578.html. Multiple files for one field use separate parts with the same name.
  • Constructor Details

    • FormData

      public FormData()
  • Method Details

    • toEntity

      public RequestEntity toEntity(String boundary, Multipart.FormData.FilenameEncoding encoding)
      Renders form data with an explicit outgoing filename encoding. Existing overloads retain their current extended filename behavior. A nonlegacy encoding overrides filename* only when filename is present. Percent encoding requires support from the recipient; it does not change decoding.
      Specified by:
      toEntity in interface Multipart.FormData
      Parameters:
      boundary - (undocumented)
      encoding - (undocumented)
      Returns:
      (undocumented)
    • mediaType

      public MediaType.Multipart mediaType()
      Description copied from interface: Multipart
      The media-type this multipart content carries.
      Specified by:
      mediaType in interface Multipart
      Returns:
      (undocumented)
    • parts

      public abstract org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.http.scaladsl.model.Multipart.FormData.BodyPart,Object> parts()
      Description copied from interface: Multipart
      The stream of body parts this content consists of.
      Specified by:
      parts in interface Multipart
      Returns:
      (undocumented)
    • toStrict

      public scala.concurrent.Future<org.apache.pekko.http.scaladsl.model.Multipart.FormData.Strict> toStrict(scala.concurrent.duration.FiniteDuration timeout, org.apache.pekko.stream.Materializer fm)
      Description copied from interface: Multipart
      Converts this content into its strict counterpart. The given timeout denotes the max time that an individual part must be read in. The Future is failed with an TimeoutException if one part isn't read completely after the given timeout.
      Specified by:
      toStrict in interface Multipart
      Parameters:
      timeout - (undocumented)
      fm - (undocumented)
      Returns:
      (undocumented)
    • getParts

      public org.apache.pekko.stream.javadsl.Source<? extends Multipart.FormData.BodyPart,Object> getParts()
      Java API
      Specified by:
      getParts in interface Multipart
      Specified by:
      getParts in interface Multipart
      Specified by:
      getParts in interface Multipart.FormData
    • toStrict

      public CompletionStage<Multipart.FormData.Strict> toStrict(long timeoutMillis, org.apache.pekko.stream.Materializer materializer)
      Java API
      Specified by:
      toStrict in interface Multipart
      Specified by:
      toStrict in interface Multipart
      Specified by:
      toStrict in interface Multipart.FormData