Struct esp_idf_hal::sys::esp_http_client_config_t
source · #[repr(C)]pub struct esp_http_client_config_t {Show 38 fields
pub url: *const i8,
pub host: *const i8,
pub port: i32,
pub username: *const i8,
pub password: *const i8,
pub auth_type: u32,
pub path: *const i8,
pub query: *const i8,
pub cert_pem: *const i8,
pub cert_len: usize,
pub client_cert_pem: *const i8,
pub client_cert_len: usize,
pub client_key_pem: *const i8,
pub client_key_len: usize,
pub client_key_password: *const i8,
pub client_key_password_len: usize,
pub user_agent: *const i8,
pub method: u32,
pub timeout_ms: i32,
pub disable_auto_redirect: bool,
pub max_redirection_count: i32,
pub max_authorization_retries: i32,
pub event_handler: Option<unsafe extern "C" fn(_: *mut esp_http_client_event) -> i32>,
pub transport_type: u32,
pub buffer_size: i32,
pub buffer_size_tx: i32,
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 i8,
pub crt_bundle_attach: Option<unsafe extern "C" fn(_: *mut c_void) -> i32>,
pub keep_alive_enable: bool,
pub keep_alive_idle: i32,
pub keep_alive_interval: i32,
pub keep_alive_count: i32,
pub if_name: *mut ifreq,
pub ds_data: *mut c_void,
}
Expand description
@brief HTTP configuration
Fields§
§url: *const i8
< HTTP URL, the information on the URL is most important, it overrides the other fields below, if any
host: *const i8
< Domain or IP as string
port: i32
< Port to connect, default depend on esp_http_client_transport_t (80 or 443)
username: *const i8
< Using for Http authentication
password: *const i8
< Using for Http authentication
auth_type: u32
< Http authentication type, see esp_http_client_auth_type_t
path: *const i8
< HTTP Path, if not set, default is /
query: *const i8
< HTTP query
cert_pem: *const i8
< 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 i8
< 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 i8
< 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 i8
< Client key decryption password string
client_key_password_len: usize
< String length of the password pointed to by client_key_password
user_agent: *const i8
< The User Agent string to send with HTTP requests
method: u32
< HTTP Method
timeout_ms: i32
< Network timeout in milliseconds
disable_auto_redirect: bool
< Disable HTTP automatic redirects
max_redirection_count: i32
< 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: Option<unsafe extern "C" fn(_: *mut esp_http_client_event) -> i32>
< HTTP Event Handle
transport_type: u32
< HTTP transport type, see esp_http_client_transport_t
buffer_size: i32
< HTTP receive buffer size
buffer_size_tx: i32
< 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 i8
< 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(_: *mut c_void) -> i32>
< 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: i32
< Keep-alive idle time. Default is 5 (second)
keep_alive_interval: i32
< Keep-alive interval time. Default is 5 (second)
keep_alive_count: i32
< 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
source§fn default() -> esp_http_client_config_t
fn default() -> 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: 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
)§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
)