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_authorization_retries: i32

< 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

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<(), Error>

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

impl Default for esp_http_client_config_t

source§

fn default() -> esp_http_client_config_t

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.