Struct restson::RestClient

source ·
pub struct RestClient { /* private fields */ }
Expand description

REST client to make HTTP GET and POST requests.

Implementations

Construct new client with default configuration to make HTTP requests.

Use Builder to configure the client.

Configure a client

Set whether a message body consisting only ‘null’ (from serde serialization) is sent in POST/PUT

Set credentials for HTTP Basic authentication.

Set request timeout

Set HTTP header from string name and value.

The header is added to all subsequent GET and POST requests unless the headers are cleared with clear_headers() call.

Clear all previously set headers

Make a GET request.

Make a GET request with query parameters.

Make a POST request.

Make a PUT request.

Make a PATCH request.

Make POST request with query parameters.

Make PUT request with query parameters.

Make PATCH request with query parameters.

Make a POST request and capture returned body.

Make a PUT request and capture returned body.

Make a POST request with query parameters and capture returned body.

Make a PUT request with query parameters and capture returned body.

Make a DELETE request.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.