## Assertions for HTTP client and server Assertions for HTTP client and server — Checks that your HTTP client/server works as you expect with libsoup support. |

## Synopsis

    void                soupcut_message_assert_equal_content_type
                                                            (const gchar *expected,
                                                             SoupMessage *message,
                                                             ...);
    void                soupcut_client_assert_equal_content_type
                                                            (const gchar *expected,
                                                             SoupCutClient *client,
                                                             ...);
    void                soupcut_client_assert_response      (SoupCutClient *client,
                                                             ...);
    void                soupcut_client_assert_equal_body    (const gchar *expected,
                                                             SoupCutClient *client,
                                                             ...);
    void                soupcut_client_assert_match_body    (const gchar *pattern,
                                                             SoupCutClient *client,
                                                             ...);

## Description

## Details

### soupcut_message_assert_equal_content_type ()

    void                soupcut_message_assert_equal_content_type
                                                            (const gchar *expected,
                                                             SoupMessage *message,
                                                             ...);

Passes if `expected` == `message->response_headers->content_type`.

`expected` : | an expected Content-Type.
`message` : | a SoupMessage.
`...` : | optional message. See `cut_message()` for details.

Since 1.0.8

### soupcut_client_assert_equal_content_type ()

    void                soupcut_client_assert_equal_content_type
                                                            (const gchar *expected,
                                                             SoupCutClient *client,
                                                             ...);

Passes if `expected` equals to Content-Type of the latest message of `client`.

`expected` : | an expected Content-Type.
`client` : | a SoupCutClient.
`...` : | optional message. See `cut_message()` for details.

Since 1.0.8

### soupcut_client_assert_response ()

    void                soupcut_client_assert_response      (SoupCutClient *client,
                                                             ...);

Passes if status code of `client` is 2XX.

`client` : | a SoupCutClient.
`...` : | optional message. See `cut_message()` for details.

Since 1.0.8

### soupcut_client_assert_equal_body ()

    void                soupcut_client_assert_equal_body    (const gchar *expected,
                                                             SoupCutClient *client,
                                                             ...);

Passes if `expected` == `client->response_body->data`.

`expected` : | an expected response body.
`client` : | a SoupCutClient.
`...` : | optional message. See `cut_message()` for details.

Since 1.0.8

### soupcut_client_assert_match_body ()

    void                soupcut_client_assert_match_body    (const gchar *pattern,
                                                             SoupCutClient *client,
                                                             ...);

Passes if `pattern` matches the response body of the latest message of `client`.

`pattern` : | the regular expression pattern.
`client` : | a SoupCutClient.
`...` : | optional message. See `cut_message()` for details.

Since 1.0.8