#[repr(C)]
pub struct esp_http_client_config_t {
Show 36 fields pub url: *const c_char, pub host: *const c_char, pub port: c_int, pub username: *const c_char, pub password: *const c_char, pub auth_type: esp_http_client_auth_type_t, pub path: *const c_char, pub query: *const c_char, pub cert_pem: *const c_char, pub cert_len: usize, pub client_cert_pem: *const c_char, pub client_cert_len: usize, pub client_key_pem: *const c_char, pub client_key_len: usize, pub client_key_password: *const c_char, pub client_key_password_len: usize, pub user_agent: *const c_char, pub method: esp_http_client_method_t, pub timeout_ms: c_int, pub disable_auto_redirect: bool, pub max_redirection_count: c_int, pub max_authorization_retries: c_int, pub event_handler: http_event_handle_cb, pub transport_type: esp_http_client_transport_t, pub buffer_size: c_int, pub buffer_size_tx: c_int, pub user_data: *mut c_void, pub is_async: bool, pub use_global_ca_store: bool, pub skip_cert_common_name_check: bool, pub crt_bundle_attach: Option<unsafe extern "C" fn(conf: *mut c_void) -> esp_err_t>, pub keep_alive_enable: bool, pub keep_alive_idle: c_int, pub keep_alive_interval: c_int, pub keep_alive_count: c_int, pub if_name: *mut ifreq,
}
Expand description

@brief HTTP configuration

Fields

url: *const c_char

< HTTP URL, the information on the URL is most important, it overrides the other fields below, if any

host: *const c_char

< Domain or IP as string

port: c_int

< Port to connect, default depend on esp_http_client_transport_t (80 or 443)

username: *const c_char

< Using for Http authentication

password: *const c_char

< Using for Http authentication

auth_type: esp_http_client_auth_type_t

< Http authentication type, see esp_http_client_auth_type_t

path: *const c_char

< HTTP Path, if not set, default is /

query: *const c_char

< HTTP query

cert_pem: *const c_char

< SSL server certification, PEM format as string, if the client requires to verify server

cert_len: usize

< Length of the buffer pointed to by cert_pem. May be 0 for null-terminated pem

client_cert_pem: *const c_char

< SSL client certification, PEM format as string, if the server requires to verify client

client_cert_len: usize

< Length of the buffer pointed to by client_cert_pem. May be 0 for null-terminated pem

client_key_pem: *const c_char

< SSL client key, PEM format as string, if the server requires to verify client

client_key_len: usize

< Length of the buffer pointed to by client_key_pem. May be 0 for null-terminated pem

client_key_password: *const c_char

< Client key decryption password string

client_key_password_len: usize

< String length of the password pointed to by client_key_password

user_agent: *const c_char

< The User Agent string to send with HTTP requests

method: esp_http_client_method_t

< HTTP Method

timeout_ms: c_int

< Network timeout in milliseconds

disable_auto_redirect: bool

< Disable HTTP automatic redirects

max_redirection_count: c_int

< Max number of redirections on receiving HTTP redirect status code, using default value if zero

max_authorization_retries: c_int

< Max connection retries on receiving HTTP unauthorized status code, using default value if zero. Disables authorization retry if -1

event_handler: http_event_handle_cb

< HTTP Event Handle

transport_type: esp_http_client_transport_t

< HTTP transport type, see esp_http_client_transport_t

buffer_size: c_int

< HTTP receive buffer size

buffer_size_tx: c_int

< HTTP transmit buffer size

user_data: *mut c_void

< HTTP user_data context

is_async: bool

< Set asynchronous mode, only supported with HTTPS for now

use_global_ca_store: bool

< Use a global ca_store for all the connections in which this bool is set.

skip_cert_common_name_check: bool

< Skip any validation of server certificate CN field

crt_bundle_attach: Option<unsafe extern "C" fn(conf: *mut c_void) -> esp_err_t>

< Function pointer to esp_crt_bundle_attach. Enables the use of certification bundle for server verification, must be enabled in menuconfig

keep_alive_enable: bool

< Enable keep-alive timeout

keep_alive_idle: c_int

< Keep-alive idle time. Default is 5 (second)

keep_alive_interval: c_int

< Keep-alive interval time. Default is 5 (second)

keep_alive_count: c_int

< Keep-alive packet retry send count. Default is 3 counts

if_name: *mut ifreq

< The name of interface for data to go through. Use the default interface without setting

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.