Struct chrootable_https::Client
source · pub struct Client<R: DnsResolver> { /* private fields */ }
Expand description
A Client to make outgoing HTTP requests.
Uses an specific DNS resolver.
Implementations§
source§impl<R: DnsResolver + 'static> Client<R>
impl<R: DnsResolver + 'static> Client<R>
sourcepub fn new(resolver: R) -> Client<R>
pub fn new(resolver: R) -> Client<R>
Create a new client with a specific DNS resolver.
This bypasses /etc/resolv.conf
.
sourcepub fn get(&self, url: &str) -> ResponseFuture
pub fn get(&self, url: &str) -> ResponseFuture
Shorthand function to do a GET request with HttpClient::request
.