put_data_sync
Description:
Writes data to a resource identified by uri
to the server.
The URI cannot reference a collection.
The etag
argument is used to avoid clashes when overwriting existing resources. It can contain three values: - null
-
to write completely new resource - empty string - write new resource or overwrite any existing, regardless changes on the server - valid ETag -
overwrite existing resource only if it wasn't changed on the server.
Note that the actual usage of etag
is also influenced by
avoid_ifmatch property of the associated
Source.
The optional in_headers
can contain additional headers to be added to the request. These headers replace any existing in the
request headers, without support for the list-values headers.
The out_href
, if provided, is filled with the resulting URI of the written resource. It can be different from the uri
when the server redirected to a different location.
The out_etag
contains ETag of the resource after it had been saved.
The optional out_headers
contains response headers. Free it with soup_message_headers_free
, when no longer needed.
To write large data use put_sync instead.
Parameters:
this | |
uri |
URI of the resource to write |
etag |
an ETag of the resource, if it's an existing resource, or |
content_type |
Content-Type of the |
in_headers |
additional MessageHeaders to be added to the request, or |
bytes |
actual bytes to be written |
length |
how many bytes to write, or -1, when the |
out_href |
optional return location for href of the resource, or |
out_etag |
optional return location for etag of the resource, or |
out_headers |
optional return location for response MessageHeaders, or |
cancellable |
optional Cancellable object, or |
Returns:
Whether succeeded. |