MessageBody.setAccumulate

Sets or clears the accumulate flag on @body. (The default value is %TRUE.) If set to %FALSE, @body's %data field will not be filled in after the body is fully sent/received, and the chunks that make up @body may be discarded when they are no longer needed.

In particular, if you set this flag to %FALSE on an "incoming" message body (that is, the #SoupMessage:response_body of a client-side message, or #SoupMessage:request_body of a server-side message), this will cause each chunk of the body to be discarded after its corresponding #SoupMessage::got_chunk signal is emitted. (This is equivalent to setting the deprecated %SOUP_MESSAGE_OVERWRITE_CHUNKS flag on the message.)

If you set this flag to %FALSE on the #SoupMessage:response_body of a server-side message, it will cause each chunk of the body to be discarded after its corresponding #SoupMessage::wrote_chunk signal is emitted.

If you set the flag to %FALSE on the #SoupMessage:request_body of a client-side message, it will block the accumulation of chunks into @body's %data field, but it will not normally cause the chunks to be discarded after being written like in the server-side #SoupMessage:response_body case, because the request body needs to be kept around in case the request needs to be sent a second time due to redirection or authentication. However, if you set the %SOUP_MESSAGE_CAN_REBUILD flag on the message, then the chunks will be discarded, and you will be responsible for recreating the request body after the #SoupMessage::restarted signal is emitted.

class MessageBody
void
setAccumulate
()

Parameters

accumulate bool

whether or not to accumulate body chunks in @body

Meta

Since

2.24