Convenience HTTP server API: Cutter Reference Manual

## Convenience HTTP server API Convenience HTTP server API — API to work as HTTP server. |

## Functions

SoupServer * | soupcut_server_take ()
SoupServer * | soupcut_server_take_new ()
const gchar * | soupcut_server_build_uri ()

## Description

Useful wrappers for SoupServer are provided.

## Functions

### soupcut_server_take ()

    SoupServer *
    soupcut_server_take (SoupServer *server);

`server` is shut down and unref when tear down.

#### Parameters

server | a SoupServer. |

#### Returns

`server` owned by Cutter. Don't `g_object_unref()` it.

Since: 1.0.8

### soupcut_server_take_new ()

    SoupServer *
    soupcut_server_take_new (GMainContext *context);

Creates and returns a new SoupServer, whose context is `context` . The server is shut down and unref when tear down.

#### Parameters

context | a GMainContext for the main loop of a new server. |

#### Returns

a new SoupServer owned by Cutter. Don't `g_object_unref()` it.

Since: 1.0.8

### soupcut_server_build_uri ()

    const gchar *
    soupcut_server_build_uri (SoupServer *server,
                              const gchar *path);

an URI is built and returned with the base uri of `server` and `path` .

#### Parameters

server | a SoupServer. |
path | a path. |

#### Returns

a new uri string owned by Cutter. Don't free it.

Since: 1.0.8

## See Also

Assertions for HTTP client and server