HTTP Server#
This module contains the HTTP Server API data types.
Modules#
sl_http_server_uri_query_parameter_t
Typedefs#
Callback function type for handling HTTP requests.
Structure representing HTTP server request parameters.
HTTP server handle used to manage all HTTP server functions.
Typedef Documentation#
sl_http_request_handler_t#
sl_http_request_handler_t )(sl_http_server_t *handle, sl_http_server_request_t *request)
Callback function type for handling HTTP requests.
[out] | handle | Pointer to the HTTP server handle of type sl_http_server_t. This handle represents the current state and configuration of the server. |
[out] | request | Pointer to the HTTP request of type sl_http_server_request_t. This structure contains the details of the received request, including URI, headers, and data. |
This callback is invoked when an HTTP request is received by the server. The function should process the request and return an appropriate status.
Returns
sl_status_t - Status of the operation. For more details, see https://docs.silabs.com/gecko-platform/latest/platform-common/status for details..
SL_STATUS_OK: Operation successful.
SL_STATUS_INVALID_PARAMETER: One or more input parameters are NULL or invalid.
SL_STATUS_FAIL: Failed to process the HTTP request.
235
of file components/service/sl_http_server/inc/sl_http_server_types.h
sl_http_server_request_t#
typedef struct sl_http_server_request_s sl_http_server_request_t
Structure representing HTTP server request parameters.
This structure holds the parameters for an HTTP server request, including the request URI, HTTP version, headers, request type, and data length.
208
of file components/service/sl_http_server/inc/sl_http_server_types.h
sl_http_server_t#
typedef struct sl_http_server_s sl_http_server_t
HTTP server handle used to manage all HTTP server functions.
This structure holds the state and configuration of the HTTP server, including sockets, synchronization events, request and response data, and buffers.
207
of file components/service/sl_http_server/inc/sl_http_server_types.h