#include <anch_rest_nginx.h>
◆ abi_version
| unsigned int anch_rest_application_t::abi_version |
◆ create
| void *(*) anch_rest_application_t::create(const char *config, char *error, size_t error_size) |
Create application (called once in each worker process)
- Parameters
-
| config | the configuration string (second anch_rest_app argument, empty when not set) |
| error | the buffer for error message |
| error_size | the error buffer size |
- Returns
- the application,
NULL on error
◆ destroy
| void(*) anch_rest_application_t::destroy(void *app) |
Destroy application
- Parameters
-
◆ handle
Handle request (thread safe). The response is started with writer->start , then its body is written with writer->write . Errors before start are answered with status 500 by the application.
- Parameters
-
| app | the application |
| request | the request |
| writer | the response writer |
- Returns
0 when response is complete, -1 when response has been interrupted after its start (the connection has to be closed) ; a response which has not been started is answered with 500
The documentation for this struct was generated from the following file: