Structure representing HTTP server response parameters.

This structure holds the parameters for an HTTP server response, including the response code, content type, headers, and data buffer.

Public Attributes#

HTTP response code (e.g., 200 for OK, 404 for Not Found)

char *

Content type of the response (e.g., "text/html", "application/json"). Must be a null-terminated string.

Pointer to an array of headers. Each header is a key-value pair.

uint16_t

Number of headers in the headers array.

uint8_t *

Pointer to the data buffer containing the response body.

uint32_t

Length of the data currently in the data buffer.

uint32_t

Total length of the data to be sent in the response.

Public Attribute Documentation#

response_code#

sl_http_response_code_t sl_http_server_response_t::response_code

HTTP response code (e.g., 200 for OK, 404 for Not Found)


content_type#

char* sl_http_server_response_t::content_type

Content type of the response (e.g., "text/html", "application/json"). Must be a null-terminated string.


headers#

sl_http_header_t* sl_http_server_response_t::headers

Pointer to an array of headers. Each header is a key-value pair.


header_count#

uint16_t sl_http_server_response_t::header_count

Number of headers in the headers array.


data#

uint8_t* sl_http_server_response_t::data

Pointer to the data buffer containing the response body.


current_data_length#

uint32_t sl_http_server_response_t::current_data_length

Length of the data currently in the data buffer.


expected_data_length#

uint32_t sl_http_server_response_t::expected_data_length

Total length of the data to be sent in the response.