SilcHttpServerCallback

SYNOPSIS

    typedef void (*SilcHttpServerCallback)(SilcHttpServer httpd,
                                           SilcHttpConnection conn,
                                           const char *uri,
                                           const char *method,
                                           SilcBuffer data,
                                           void *context);

DESCRIPTION

The HTTP request callback that is called everytime a new HTTP request comes from a HTTP client. The `uri' is the requested URI (web page), and the `method' is the HTTP request method (GET, POST, etc.). The `data' is non-NULL only if the `method' is POST, and it includes the the POST data.

The requested web page must be returned to the HTTP client from this callback by calling silc_http_server_send or error is returned by calling silc_http_server_send_error.

The silc_http_server_get_header may be called to find a specific HTTP header from this request. New headers may be added to the reply by calling silc_http_server_add_header.