Interface FormData

All Superinterfaces:
UploadData

public interface FormData extends UploadData
An upload data of the application/x-www-form-urlencoded content type.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder of FormData.
    static interface 
    A key-value pair that represents a segment of a form data, for example a form field content.
  • 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 form data or an empty list if the form does not contain any data.
    Creates a new FormData builder.
  • Method Details

    • newBuilder

      static FormData.Builder newBuilder()
      Creates a new FormData builder.
      Returns:
      a new FormData.Builder instance
    • data

      default List<FormData.Pair> data()
      Returns an immutable list of the key-value pairs each representing a segment of a 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