soup.message_body
Module for [MessageBody] class
class MessageBody
Types 1
classMessageBody : gobject.boxed.Boxed
#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
glib.bytes.Bytes flatten() nothrowFills in body's data field with a buffer containing all of the data in 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 wroteChunk(glib.bytes.Bytes chunk) nothrowHandles the #SoupMessageBody part of writing a chunk of data to the network.