Struct chttp::client::Client
[−]
[src]
pub struct Client { /* fields omitted */ }An HTTP client for making requests.
The client maintains a connection pool internally and is expensive to create, so we recommend re-using your clients instead of discarding and recreating them.
Methods
impl Client[src]
fn builder() -> Builder[src]
Create a new HTTP client builder.
fn get(&self, uri: &str) -> Result<Response, Error>[src]
Sends a GET request.
fn post<B: Into<Body>>(&self, uri: &str, body: B) -> Result<Response, Error>[src]
Sends a POST request.
fn put<B: Into<Body>>(&self, uri: &str, body: B) -> Result<Response, Error>[src]
Sends a PUT request.
fn delete(&self, uri: &str) -> Result<Response, Error>[src]
Sends a DELETE request.
fn send(&self, request: Request) -> Result<Response, Error>[src]
Sends a request and returns the response.