Interface MultipartFormData

All Superinterfaces:
UploadData

public interface MultipartFormData extends UploadData
An upload data of the multipart/form-data content type.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder of MultipartFormData.
    static interface 
    A key-value pair that represents a segment of a multi-part form data.
  • Method Summary

    Modifier and Type
    Method
    Description
    default byte[]
    Returns an array containing the upload data bytes of the associated URL request.
    default ContentType
    Returns the content type of this upload data as specified in the Content-Type header.
    Returns an immutable list of the key-value pairs each representing a segment of a multi-part form data or an empty list if the form does not contain any data.
     
  • Method Details

    • newBuilder

      static MultipartFormData.Builder newBuilder()
    • data

      default List<MultipartFormData.Pair> data()
      Returns an immutable list of the key-value pairs each representing a segment of a multi-part form data or an empty list if the form does not contain any data.
    • bytes

      default byte[] bytes()
      Description copied from interface: UploadData
      Returns an array containing the upload data bytes of the associated URL request.

      If the upload data is constructed manually and is not associated with a URL request, returns an empty array.

      Specified by:
      bytes in interface UploadData
    • contentType

      default ContentType contentType()
      Description copied from interface: UploadData
      Returns the content type of this upload data as specified in the Content-Type header.

      If the upload data is constructed manually, the Content-Type header will be created after it is passed to the Chromium engine. Thus, the returned ContentType object will not contain meaningful values in this case.

      Specified by:
      contentType in interface UploadData