Interface MultipartFileSpec


  • public interface MultipartFileSpec
    • Method Detail

      • add

        MultipartFormSpec add()
        Add the file to the parent multipart form

        Note: Must be called to include the file into the payload.

        Returns:
        a specification of a multipart form
      • contentType

        MultipartFileSpec contentType​(String contentType)
        Specify the content type

        Required. Defaults to 'text/plain'.

        Returns:
        a specification of a multipart file
      • data

        MultipartFileSpec data​(byte[] data)
        Specify the file contents

        Required. No default provided.

        Returns:
        a specification of a multipart file
      • data

        MultipartFileSpec data​(String data)
        Specify the file contents

        Required. No default provided.

        Note: this value is encoded into a byte array using UTF-8

        Returns:
        a specification of a multipart file
      • encoding

        MultipartFileSpec encoding​(String encoding)
        Specify the form field

        Optional. No default provided.

        Valid options include BASE64, QUOTED-PRINTABLE, 8BIT, 7BIT, BINARY. Custom encodings of the for X- are also supported. See https://www.w3.org/Protocols/rfc1341/5_Content-Transfer-Encoding.html for more information.

        Note: Netty will need to understand this encoding scheme.

        Returns:
        a specification of a multipart file
      • field

        MultipartFileSpec field​(String field)
        Specify the form field

        Required. Defaults to 'file'.

        Returns:
        a specification of a multipart file
      • name

        MultipartFileSpec name​(String name)
        Specify the uploaded filename

        Required. Defaults to 'filename.txt'.

        Returns:
        a specification of a multipart file