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_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

§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

source§

fn clone(&self) -> esp_http_client_config_t

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for esp_http_client_config_t

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for esp_http_client_config_t

source§

fn default() -> Self

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

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 T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> CloneToUninit for T
where T: Copy,

§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.