Gjsify LogoGjsify Logo

Represents a multipart HTTP message body, parsed according to the syntax of RFC 2046. Of particular interest to HTTP are multipart/byte-ranges and multipart/form-data.

Although the headers of a #SoupMultipart body part will contain the full headers from that body part, libsoup does not interpret them according to MIME rules. For example, each body part is assumed to have "binary" Content-Transfer-Encoding, even if its headers explicitly state otherwise. In other words, don't try to use #SoupMultipart for handling real MIME multiparts.

record

Hierarchy

  • Multipart

Index

Constructors

  • Creates a new empty #SoupMultipart with a randomly-generated boundary string. Note that mime_type must be the full MIME type, including "multipart/".

    Parameters

    • mime_type: string

      the MIME type of the multipart to create.

    Returns Soup.Multipart

Properties

name: string

Methods

  • append_form_file(control_name: string, filename: string, content_type: string, body: Bytes): void
  • Adds a new MIME part containing body to multipart, using "Content-Disposition: form-data", as per the HTML forms specification.

    Parameters

    • control_name: string

      the name of the control associated with this file

    • filename: string

      the name of the file, or %NULL if not known

    • content_type: string

      the MIME type of the file, or %NULL if not known

    • body: Bytes

      the file data

    Returns void

  • append_form_string(control_name: string, data: string): void
  • Adds a new MIME part containing data to multipart, using "Content-Disposition: form-data", as per the HTML forms specification.

    Parameters

    • control_name: string

      the name of the control associated with data

    • data: string

      the body data

    Returns void

  • Adds a new MIME part to multipart with the given headers and body. (The multipart will make its own copies of headers and body, so you should free your copies if you are not using them for anything else.)

    Parameters

    Returns void

  • free(): void
  • get_length(): number
  • Creates a new empty #SoupMultipart with a randomly-generated boundary string. Note that mime_type must be the full MIME type, including "multipart/".

    Parameters

    • mime_type: string

      the MIME type of the multipart to create.

    Returns Soup.Multipart

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method