send_and_read_async


Description:

public async Bytes send_and_read_async (Message msg, int io_priority, Cancellable? cancellable) throws Error

Asynchronously sends msg and reads the response body.

When callback is called, then either msg has been sent, and its response body read, or else an error has occurred. This function should only be used when the resource to be retrieved is not too long and can be stored in memory. Call [ method@Session.send_and_read_finish] to get a [struct@GLib.Bytes] with the response body.

See [method@Session.send] for more details on the general semantics.

Parameters:

this

a Session

msg

a Message

io_priority

the I/O priority of the request

cancellable

a Cancellable

callback

the callback to invoke

user_data

data for callback