set_accumulate


Description:

[ Version ( since = "2.24" ) ]
public void set_accumulate (bool accumulate)

Sets or clears the accumulate flag on this.

(The default value is true.) If set to false, this's data field will not be filled in after the body is fully sent/received, and the chunks that make up this 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 got_chunk signal is emitted. (This is equivalent to setting the deprecated 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 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 this'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 CAN_REBUILD flag on the message, then the chunks will be discarded, and you will be responsible for recreating the request body after the restarted signal is emitted.

Parameters:

this

a MessageBody

accumulate

whether or not to accumulate body chunks in this