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)


Definition at line 261 of file components/service/sl_http_server/inc/sl_http_server_types.h

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.


Definition at line 263 of file components/service/sl_http_server/inc/sl_http_server_types.h

headers#

sl_http_header_t* sl_http_server_response_t::headers

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


Definition at line 264 of file components/service/sl_http_server/inc/sl_http_server_types.h

header_count#

uint16_t sl_http_server_response_t::header_count

Number of headers in the headers array.


Definition at line 265 of file components/service/sl_http_server/inc/sl_http_server_types.h

data#

uint8_t* sl_http_server_response_t::data

Pointer to the data buffer containing the response body.


Definition at line 266 of file components/service/sl_http_server/inc/sl_http_server_types.h

current_data_length#

uint32_t sl_http_server_response_t::current_data_length

Length of the data currently in the data buffer.


Definition at line 267 of file components/service/sl_http_server/inc/sl_http_server_types.h

expected_data_length#

uint32_t sl_http_server_response_t::expected_data_length

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


Definition at line 268 of file components/service/sl_http_server/inc/sl_http_server_types.h