Message.setRequestBodyFromBytes

Set the request body of a #SoupMessage from glib.bytes.Bytes.

If content_type is null and bytes is not null the Content-Type header will not be changed if present. The request body needs to be set again in case msg is restarted (in case of redirection or authentication).

class Message
void
setRequestBodyFromBytes
(
string contentType = null
,)

Parameters

contentType string

MIME Content-Type of the body, or null if unknown

bytes glib.bytes.Bytes

a #GBytes with the request body data