Declaration [src]

soup_session_send_and_read (
  SoupSession* session,
  SoupMessage* msg,
  GCancellable* cancellable,
  GError** error

Description [src]

Synchronously sends msg and reads the response body.

On success, a GBytes will be returned with the response body. This function should only be used when the resource to be retrieved is not too long and can be stored in memory.

See soup_session_send() for more details on the general semantics.


msg SoupMessage

A SoupMessage.

 The data is owned by the caller of the function.
cancellable GCancellable

A GCancellable.

 The argument can be NULL.
 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: GBytes

A GBytes, or NULL on error.

 The caller of the method takes ownership of the data, and is responsible for freeing it.