set_content_length


Description:

public void set_content_length (int64 content_length)

Sets the message body length that this will declare, and sets this's encoding to soup_encoding_content_length.

You do not normally need to call this; if this is set to use Content-Length encoding, libsoup will automatically set its Content-Length header for you immediately before sending the headers. One situation in which this method is useful is when generating the response to a HEAD request; Calling [[email protected]_content_length] allows you to put the correct content length into the response without needing to waste memory by filling in a response body which won't actually be sent.

Parameters:

this

a MessageHeaders

content_length

the message body length




2022 vala-language.org