soup.multipart
Module for [Multipart] class
class Multipart
Types 1
classMultipart : gobject.boxed.Boxed
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.
Methods
Multipart self()Returns `this`, for use in `with` statements.soup.multipart.Multipart newFromMessage(soup.message_headers.MessageHeaders headers, glib.bytes.Bytes body_)Parses headers and body to form a new #SoupMultipartvoid appendFormFile(string controlName, string filename, string contentType, glib.bytes.Bytes body_)Adds a new MIME part containing body to multipartvoid appendFormString(string controlName, string data)Adds a new MIME part containing data to multipart.void appendPart(soup.message_headers.MessageHeaders headers, glib.bytes.Bytes body_)Adds a new MIME part to multipart with the given headers and body.int getLength()Gets the number of body parts in multipart. Returns: the number of body parts in multipartbool getPart(int part, out soup.message_headers.MessageHeaders headers, out glib.bytes.Bytes body_)Gets the indicated body part from multipart.void toMessage(soup.message_headers.MessageHeaders destHeaders, out glib.bytes.Bytes destBody)Serializes multipart to destheaders and destbody.