Struct esp_idf_sys::esp_http_client_config_t
source · #[repr(C)]pub struct esp_http_client_config_t {Show 38 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 common_name: *const c_char,
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,
pub ds_data: *mut c_void,
}
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 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
common_name: *const c_char
< Pointer to the string containing server certificate common name. If non-NULL, server certificate CN must match this name, If NULL, server certificate CN must match hostname.
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
ds_data: *mut c_void
< Pointer for digital signature peripheral context, see ESP-TLS Documentation for more details
Trait Implementations§
source§impl Clone for esp_http_client_config_t
impl Clone for esp_http_client_config_t
source§fn clone(&self) -> esp_http_client_config_t
fn clone(&self) -> esp_http_client_config_t
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for esp_http_client_config_t
impl Debug for esp_http_client_config_t
source§impl Default for esp_http_client_config_t
impl Default for esp_http_client_config_t
impl Copy for esp_http_client_config_t
Auto Trait Implementations§
impl Freeze for esp_http_client_config_t
impl RefUnwindSafe for esp_http_client_config_t
impl !Send for esp_http_client_config_t
impl !Sync for esp_http_client_config_t
impl Unpin for esp_http_client_config_t
impl UnwindSafe for esp_http_client_config_t
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)