## 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. |

## Functions

void | soupcut_message_assert_equal_content_type ()
void | soupcut_client_assert_equal_content_type ()
void | soupcut_client_assert_response ()
void | soupcut_client_assert_equal_body ()
void | soupcut_client_assert_match_body ()

## Description

## Functions

### 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` .

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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` .

#### Parameters

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

Since: 1.0.8

## Types and Values