### Method

# EDataServer WebDAVSession post_sync

since: 3.32

#### Declaration [src]

    gboolean
    e_webdav_session_post_sync (
      EWebDAVSession* webdav,
      const gchar* uri,
      const gchar* data,
      gsize data_length,
      const gchar* in_content_type,
      SoupMessageHeaders* in_headers,
      gchar** out_content_type,
      SoupMessageHeaders** out_headers,
      GByteArray** out_content,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Issues POST request on the provided `uri`, or, in case it’s `NULL`, on the URI defined in associated `ESource`.

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 optional `out_content_type` can be used to get content type of the response. Free it 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.

The optional `out_content` can be used to get actual result content. Free it with g_byte_array_free(), when no longer needed.

Available since: 3.32

#### Parameters

`uri`

  Type: `const gchar*`

  URI to issue the request for, or `NULL` to read from `ESource`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`data`

  Type: `const gchar*`

  Data to post to the server.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`data_length`

  Type: `gsize`

  Length of `data`, or -1, when `data` is NUL-terminated.

`in_content_type`

  Type: `const gchar*`

  A Content-Type of the `data`, or `NULL`, to use application/xml.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`in_headers`

  Type: `SoupMessageHeaders`

  Additional `SoupMessageHeaders` to be added to the request, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`out_content_type`

  Type: `gchar**`

  Return location for response Content-Type, or `NULL`.

  The argument will be set by the function.
  The argument can be set to `NULL` by the method.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.
  The value is a NUL terminated UTF-8 string.

`out_headers`

  Type: `SoupMessageHeaders`

  Optional return location for response `SoupMessageHeaders`, or `NULL`.

  The argument will be set by the function.
  The argument can be `NULL`.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

`out_content`

  Type: An array of `guint8`

  Return location for response content, or `NULL`.

  The argument will be set by the function.
  The argument can be set to `NULL` by the method.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

Whether succeeded.