Multipart

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.

Constructors

this
this(string mimeType)

Creates a new empty #SoupMultipart with a randomly-generated boundary string.

Members

Functions

appendFormFile
void appendFormFile(string controlName, string filename, string contentType, glib.bytes.Bytes body_)

Adds a new MIME part containing body to multipart

appendFormString
void appendFormString(string controlName, string data)

Adds a new MIME part containing data to multipart.

appendPart
void appendPart(soup.message_headers.MessageHeaders headers, glib.bytes.Bytes body_)

Adds a new MIME part to multipart with the given headers and body.

getLength
int getLength()

Gets the number of body parts in multipart.

getPart
bool getPart(int part, soup.message_headers.MessageHeaders headers, glib.bytes.Bytes body_)

Gets the indicated body part from multipart.

toMessage
void toMessage(soup.message_headers.MessageHeaders destHeaders, glib.bytes.Bytes destBody)

Serializes multipart to dest_headers and dest_body.

Static functions

newFromMessage
soup.multipart.Multipart newFromMessage(soup.message_headers.MessageHeaders headers, glib.bytes.Bytes body_)

Parses headers and body to form a new #SoupMultipart

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.