Message.setRequestBody

Set the request body of a #SoupMessage.

If content_type is null and stream 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
setRequestBody

Parameters

contentType string

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

stream gio.input_stream.InputStream

a #GInputStream to read the request body from

contentLength ptrdiff_t

the byte length of stream or -1 if unknown