get_data_sync


Description:

public bool get_data_sync (string uri, out string? out_href, out string? out_etag, out MessageHeaders out_headers, out string out_bytes, out size_t out_length, Cancellable? cancellable = null) throws Error

Reads a resource identified by uri from the server.

The URI cannot reference a collection.

The out_bytes is filled by actual data being read. If not null, out_length is populated with how many bytes had been read. The out_bytes is always NUL-terminated, while this termination byte is not part of out_length. Free the out_bytes with g_free, when no longer needed.

Free returned pointer of out_href and out_etag, if not null, with g_free, when no longer needed.

The optional out_headers contains response headers. Free it with soup_message_headers_free, when no longer needed.

To read large data use get_sync instead.

Parameters:

this

an WebDAVSession

uri

URI of the resource to read

out_href

optional return location for href of the resource, or null

out_etag

optional return location for etag of the resource, or null

out_headers

optional return location for response MessageHeaders, or null

out_bytes

return location for bytes being read

out_length

option return location for length of bytes being read, or null

cancellable

optional Cancellable object, or null

Returns:

Whether succeeded.