### Method

# Soup Message add_status_code_handler

#### Declaration [src]

    guint
    soup_message_add_status_code_handler (
      SoupMessage* msg,
      const char* signal,
      guint status_code,
      GCallback callback,
      gpointer user_data
    )

#### Description [src]

Adds a signal handler to `msg` for `signal`.

Similar to `g_signal_connect()`, but the `callback` will only be run if `msg` has the status `status_code`.

`signal` must be a signal that will be emitted after `msg`‘s status is set (this means it can’t be a “wrote” signal).

This method is not directly available to language bindings.

#### Parameters

`signal` | `const char*`
| Signal to connect the handler to.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`status_code` | `guint`
| Status code to match against.
`callback` | `GCallback`
| The header handler.
`user_data` | `gpointer`
| Data to pass to `handler_cb`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.

#### Return value

Returns: | `guint`
| The handler ID from `g_signal_connect()`