HTTP client request configurations.
This structure holds the configuration settings for an HTTP client request, that includes the HTTP method, server address, resource URL, headers, and other options.
Configuration settings for an HTTP client request.
This structure contains all the necessary configuration parameters for making an HTTP client request, which includes the HTTP method, server address, resource URL, headers, and other options.
Public Attributes#
HTTP request method. See sl_http_client_method_type_t.
IP address should contain the IP address of the HTTP server as a string (values in ASCII), for example, "192.168.1.1" for IPv4 or "2001:0db8:85a3:0000:0000:8a2e:0370:7334" for IPv6.
Full URL string for the requested resource, including the scheme (for example, http, https), domain, port, path, query parameters, and fragment. The maximum supported HTTP URL is 2048 bytes when the SL_SI91X_FEAT_LONG_HTTP_URL bit is enabled in the feature_bit_map. If the SL_SI91X_FEAT_LONG_HTTP_URL bit is disabled, then the maximum supported length for the HTTP URL is (872 - (length of username + length of password) - length of hostname - length of IP address) bytes, excludes the delimiters.
Port number of the HTTP server.
SNI (Server Name Indication) extension to specify the hostname for servers hosting multiple domains on the same IP address of type si91x_socket_type_length_value_t.
HTTP body to be sent to the server. Setting this to NULL will process the request in chunked encoding.
Length of the HTTP body data to be posted. In the case of a chunked request, body length should be equal to the total content length.
User-defined extended header. If NULL, the default extended header will be added internally. See sl_http_client_header_t.
HTTP request timeout period in milliseconds. (Si91x chipsets do not support this feature).
Maximum number of retry attempts after a timeout. (Si91x chipsets do not support this feature).
Retry period in milliseconds after the maximum retry count is reached. (Si91x chipsets do not support this feature).
Flag to indicate whether to reuse the same TCP socket for the connection. (Si91x chipsets do not support this feature).
User-defined context for the request.
Callback function for handling HTTP client events. See sl_http_client_event_handler_t.
Hostname of the HTTP server as specified in the request header. If NULL, the ip_address is used instead of the hostname.
Public Attribute Documentation#
http_method_type#
sl_http_client_method_type_t sl_http_client_request_t::http_method_type
HTTP request method. See sl_http_client_method_type_t.
248
of file components/service/http_client/inc/sl_http_client.h
ip_address#
uint8_t* sl_http_client_request_t::ip_address
IP address should contain the IP address of the HTTP server as a string (values in ASCII), for example, "192.168.1.1" for IPv4 or "2001:0db8:85a3:0000:0000:8a2e:0370:7334" for IPv6.
250
of file components/service/http_client/inc/sl_http_client.h
resource#
uint8_t* sl_http_client_request_t::resource
Full URL string for the requested resource, including the scheme (for example, http, https), domain, port, path, query parameters, and fragment. The maximum supported HTTP URL is 2048 bytes when the SL_SI91X_FEAT_LONG_HTTP_URL bit is enabled in the feature_bit_map. If the SL_SI91X_FEAT_LONG_HTTP_URL bit is disabled, then the maximum supported length for the HTTP URL is (872 - (length of username + length of password) - length of hostname - length of IP address) bytes, excludes the delimiters.
252
of file components/service/http_client/inc/sl_http_client.h
port#
uint16_t sl_http_client_request_t::port
Port number of the HTTP server.
253
of file components/service/http_client/inc/sl_http_client.h
sni_extension#
sl_si91x_socket_type_length_value_t* sl_http_client_request_t::sni_extension
SNI (Server Name Indication) extension to specify the hostname for servers hosting multiple domains on the same IP address of type si91x_socket_type_length_value_t.
255
of file components/service/http_client/inc/sl_http_client.h
body#
uint8_t* sl_http_client_request_t::body
HTTP body to be sent to the server. Setting this to NULL will process the request in chunked encoding.
257
of file components/service/http_client/inc/sl_http_client.h
body_length#
uint32_t sl_http_client_request_t::body_length
Length of the HTTP body data to be posted. In the case of a chunked request, body length should be equal to the total content length.
259
of file components/service/http_client/inc/sl_http_client.h
extended_header#
sl_http_client_header_t* sl_http_client_request_t::extended_header
User-defined extended header. If NULL, the default extended header will be added internally. See sl_http_client_header_t.
261
of file components/service/http_client/inc/sl_http_client.h
timeout_ms#
uint16_t sl_http_client_request_t::timeout_ms
HTTP request timeout period in milliseconds. (Si91x chipsets do not support this feature).
262
of file components/service/http_client/inc/sl_http_client.h
retry_count#
uint16_t sl_http_client_request_t::retry_count
Maximum number of retry attempts after a timeout. (Si91x chipsets do not support this feature).
264
of file components/service/http_client/inc/sl_http_client.h
retry_period_ms#
uint16_t sl_http_client_request_t::retry_period_ms
Retry period in milliseconds after the maximum retry count is reached. (Si91x chipsets do not support this feature).
266
of file components/service/http_client/inc/sl_http_client.h
tcp_connection_reuse#
bool sl_http_client_request_t::tcp_connection_reuse
Flag to indicate whether to reuse the same TCP socket for the connection. (Si91x chipsets do not support this feature).
268
of file components/service/http_client/inc/sl_http_client.h
context#
void* sl_http_client_request_t::context
User-defined context for the request.
269
of file components/service/http_client/inc/sl_http_client.h
event_handler#
sl_http_client_event_handler_t sl_http_client_request_t::event_handler
Callback function for handling HTTP client events. See sl_http_client_event_handler_t.
271
of file components/service/http_client/inc/sl_http_client.h
host_name#
uint8_t* sl_http_client_request_t::host_name
Hostname of the HTTP server as specified in the request header. If NULL, the ip_address is used instead of the hostname.
273
of file components/service/http_client/inc/sl_http_client.h