### Method

# EDataServer SoupSession send_message_finish

since: 3.46

#### Declaration [src]

    GInputStream*
    e_soup_session_send_message_finish (
      ESoupSession* session,
      GAsyncResult* result,
      gchar** out_certificate_pem,
      GTlsCertificateFlags* out_certificate_errors,
      GError** error
    )

#### Description [src]

Finishes the call of e_soup_session_send_message(). This is supposed to be called from the callback passed to the e_soup_session_send_message().

The optional `out_certificate_pem` and `out_certificate_errors` are set, when provided, only if the operation failed with a TLS/SSL error.

Make sure the `GInputStream` is read and freed from the same thread, and with the same thread default main context, which this function was called from, otherwise it can break libsoup3.

Available since: 3.46

#### Parameters

`result`

  Type: `GAsyncResult`

  A `GAsyncResult` object.

  The data is owned by the caller of the method.

`out_certificate_pem`

  Type: `gchar**`

  Return location for a server TLS/SSL certificate in PEM format, when the last operation failed with a TLS/SSL error.

  The argument will be set by the function.
  The argument can be set to `NULL` by the method.
  The argument can be `NULL`.
  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_certificate_errors`

  Type: `GTlsCertificateFlags`

  Return location for a `GTlsCertificateFlags`, with certificate error flags when the operation failed with a TLS/SSL error.

  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.

`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: `GInputStream`

A `GInputStream` for reading the response body, or `NULL` on error.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.