Struct chrootable_https::Client [−][src]
pub struct Client<R: DnsResolver> { /* fields omitted */ }
Methods
impl<R: DnsResolver> Client<R>[src]
impl<R: DnsResolver> Client<R>pub fn new(resolver: R) -> Client<R>[src]
pub fn new(resolver: R) -> Client<R>Create a new client with a specific dns resolver.
This bypasses /etc/resolv.conf
pub fn timeout(&mut self, timeout: Duration)[src]
pub fn timeout(&mut self, timeout: Duration)Set a timeout, default is no timeout
pub fn pre_resolve(&self, uri: &Uri) -> Result<()>[src]
pub fn pre_resolve(&self, uri: &Uri) -> Result<()>Pre-populate the dns-cache. This function is usually called internally
pub fn get(&self, url: &str) -> Result<Response>[src]
pub fn get(&self, url: &str) -> Result<Response>Shorthand function to do a GET request with HttpClient::request
impl Client<Resolver>[src]
impl Client<Resolver>pub fn with_system_resolver() -> Result<Client<Resolver>>[src]
pub fn with_system_resolver() -> Result<Client<Resolver>>Create a new client with the system resolver from /etc/resolv.conf
Trait Implementations
impl<R: Debug + DnsResolver> Debug for Client<R>[src]
impl<R: Debug + DnsResolver> Debug for Client<R>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<R: DnsResolver> HttpClient for Client<R>[src]
impl<R: DnsResolver> HttpClient for Client<R>