soup.message_body

Module for [MessageBody] class

Types 1

#SoupMessageBody represents the request or response body of a soup.message.Message.

Note that while @length always reflects the full length of the message body, @data is normally null, and will only be filled in after soup.message_body.MessageBody.flatten is called. For client-side messages, this automatically happens for the response body after it has been fully read. Likewise, for server-side messages, the request body is automatically filled in after being read.

As an added bonus, when @data is filled in, it is always terminated with a \0 byte (which is not reflected in @length).

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
MessageBody self() nothrowReturns `this`, for use in `with` statements.
long length() @property nothrowGet `length` field. Returns: length of @data
void length(long propval) @property nothrowSet `length` field. Params: propval = length of @data
void appendBytes(glib.bytes.Bytes buffer) nothrowAppends the data from buffer to body.
void complete() nothrowTags body as being complete.
glib.bytes.Bytes flatten() nothrowFills in body's data field with a buffer containing all of the data in body.
bool getAccumulate() nothrowGets the accumulate flag on body.
glib.bytes.Bytes getChunk(long offset) nothrowGets a [glib.bytes.Bytes] containing data from body starting at offset.
void gotChunk(glib.bytes.Bytes chunk) nothrowHandles the #SoupMessageBody part of receiving a chunk of data from the network.
void setAccumulate(bool accumulate) nothrowSets or clears the accumulate flag on body.
void truncate() nothrowDeletes all of the data in body.
void wroteChunk(glib.bytes.Bytes chunk) nothrowHandles the #SoupMessageBody part of writing a chunk of data to the network.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #SoupMessageBody.