[−][src]Struct mio_httpc::HttpcCfg
Top level configuration for mio_http.
Fields
der_ca: Vec<Vec<u8>>
Extra root certificates in der format.
pem_ca: Vec<Vec<u8>>
Extra root certificates in pem format.
cache_buffers: usize
Default: 8
Max 8K buffers to keep cached for subsequent requests. Every request requires 2.
dns_servers: Vec<SocketAddr>
Set DNS servers if library can not easily get them from system (like Android). macOS, iOS and unix with /etc/resolv.conf are supported ATM. If none provided and library can't get them, google DNS servers (8.8.8.8:53, 8.8.4.4:53) will be used.
pins: Vec<(String, Vec<String>)>
SSL Pinning. every element is (hostname, vec![pin1,pin2,..])
A pin is formatted as: sha256/base64(subjectPublicKeyInfo)
sha1 is also supported though not recommended.
mio_httpc will check if public key of server matches any of the pins before sending the HTTP request.
Methods
impl HttpcCfg
[src]
pub fn new() -> HttpcCfg
[src]
pub fn certs_from_path(path: &str) -> Result<HttpcCfg>
[src]
Will read pem files (extensions .crt or .pem) from path. Path can be to file or folder.
Trait Implementations
impl Clone for HttpcCfg
[src]
fn clone(&self) -> HttpcCfg
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for HttpcCfg
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,