For sending out error code in response to HTTP request.
API to send a complete HTTP response. This API will send the data as an HTTP response to the request. This assumes that you have the entire response ready in a single buffer. If you wish to send response in incremental chunks use httpd_resp_send_chunk() instead. If no status code and content-type were set, by default this will send 200 OK status code and content type as text/html. You may call the following functions before this API to configure the response headers : httpd_resp_set_status() - for setting the HTTP status string, httpd_resp_set_type() - for setting the Content Type, httpd_resp_set_hdr() - for appending any additional field value entries in the response header
API to send a string as an HTTP response chunk. This API simply calls http_resp_send_chunk with buffer length set to string length assuming the buffer contains a null terminated string
Get the value string of a field from the request headers
API to read content data from the HTTP request This API will read HTTP content data from the HTTP request into provided buffer. Use content_len provided in httpd_req_t structure to know the length of data to be fetched. If content_len is too large for the buffer then user may have to make multiple calls to this function, each time fetching 'buf_len' number of bytes, while the pointer to content data is incremented internally by the same number.
API to append any additional headers This API sets any additional header fields that need to be sent in the response.
Search for a field in request headers and return the string length of it's value
API to send one HTTP chunk This API will send the data as an HTTP response to the request. This API will use chunked-encoding and send the response in the form of chunks. If you have the entire response contained in a single buffer, please use httpd_resp_send() instead. If no status code and content-type were set, by default this will send 200 OK status code and content type as text/html. You may call the following functions before this API to configure the response headers httpd_resp_set_status() - for setting the HTTP status string, httpd_resp_set_type() - for setting the Content Type, httpd_resp_set_hdr() - for appending any additional field value entries in the response header
API to set the HTTP status code This API sets the status of the HTTP response to the value specified. By default, the '200 OK' response is sent as the response.
For receiving HTTP request data
API to send a complete string as HTTP response. This API simply calls http_resp_send with buffer length set to string length assuming the buffer contains a null terminated string
Get the Socket Descriptor from the HTTP request This API will return the socket descriptor of the session for which URI handler was executed on reception of HTTP request. This is useful when user wants to call functions that require session socket fd, from within a URI handler, ie. : httpd_sess_get_ctx(), httpd_sess_trigger_close(), httpd_sess_update_lru_counter().
Receive and parse a WebSocket frame
Helper function for HTTP 408 Send HTTP 408 message. If you wish to send additional data in the body of the response, please use the lower-level functions directly.
For handling HTTP errors by invoking registered error handler function
Construct and send a WebSocket frame
Mark an asynchronous request as completed. This will - free the request memory - relinquish ownership of the underlying socket, so it can be reused. - allow the http server to close our socket if needed (lru_purge_enable)
For sending out data in response to an HTTP request.
Get Query string length from the request URL
Get Query string from the request URL
Helper function for HTTP 500 Send HTTP 500 message. If you wish to send additional data in the body of the response, please use the lower-level functions directly.
Start an asynchronous request. This function can be called in a request handler to get a request copy that can be used on a async thread.
For un-receiving HTTP request data This function copies data into internal buffer pending_data so that when httpd_recv is called, it first fetches this pending data and then only starts receiving from the socket
This function is for responding a WebSocket handshake
This function is for getting a frame type and responding a WebSocket control frame automatically
For sending out custom error code in response to HTTP request.
Get the value string of a cookie value from the "Cookie" request headers by cookie name.
Validates the request to prevent users from calling APIs, that are to be called only inside a URI handler, outside the handler context
Helper function for HTTP 404 Send HTTP 404 message. If you wish to send additional data in the body of the response, please use the lower-level functions directly.