Fork me on GitHub
<< back to documentation

HTTP Admin

The HTTP admin provides a service tracker and starts a HTTP web server. The civetweb web server is used as an embedded web server. Websockets are supported by the HTTP admin.

Services can register and implement HTTP requests or websocket support for a specified URI. The supported HTTP requests are: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS and PATCH. The websocket service can support different callback handlers: connect, ready, data and close.

Aliasing is also supported for both HTTP services and websocket services. Multiple aliases can be added by using the comma as seperator. Adding aliasing is done by adding the following function to the target CMakeFile (fill in and ):

        "X-Web-Resource: /<Alias path>$<SEMICOLON>/<Path to destination>, /<Alias path 2>$<SEMICOLON>/<Path to destination>"

Bundle alias resources can be added by the with the following function in the bundle CMakefile:

celix_bundle_add_dir(<TARGET> <Document root of bundle> DESTINATION ".")

Celix supported

CELIX_HTTP_ADMIN_LISTENING_PORTS                 default = 8080, can be multiple ports divided by a comma
CELIX_HTTP_ADMIN_PORT_RANGE_MIN                  default = 8000
CELIX_HTTP_ADMIN_PORT_RANGE_MAX                  default = 9000
CELIX_HTTP_ADMIN_USE_WEBSOCKETS                  default = true
CELIX_HTTP_ADMIN_WEBSOCKET_TIMEOUT_MS            default = 3600000
CELIX_HTTP_ADMIN_NUM_THREADS                     default = 1

CMake option