## Assertions for HTTP client/server based on libsoup Assertions for HTTP client/server based on libsoup — 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.

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.

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.

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.

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.

Since 1.0.8