mcorest_api_handler_fn

Web service request handler routine.

For an overview see page Web Services

Prototype

    typedef MCO_RET (* mcorest_api_handler_fn)(void *ctx, mcoapi_request_h request,
            const char *path_suffix);

Arguments

ctx
Context pointer, as specified by the mcorest_api_register_service() call.
request
Request structure.
path_suffix
Any remaining characters of the path: child path elements, query parameters, etc.

Description

The handler routine in a web service library will be called when the core library gets an HTTP request for the web service's registered path. Then, the handler will:

Return Codes

MCO_S_OK = 0
Success.
MCO_E_REST_*
Any of the Web Services Error Codes.