pub struct LinodeApiHttpClient(pub Client);
Tuple Fields§
§0: Client
Implementations§
Source§impl LinodeApiHttpClient
impl LinodeApiHttpClient
pub fn from_inner(inner: Client) -> Self
pub fn inner(&self) -> &Client
pub fn into_inner(self) -> Client
Methods from Deref<Target = Client>§
Sourcepub fn get<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn get<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a GET
request to a URL.
§Errors
This method fails whenever the supplied Url
cannot be parsed.
Sourcepub fn post<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn post<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a POST
request to a URL.
§Errors
This method fails whenever the supplied Url
cannot be parsed.
Sourcepub fn put<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn put<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a PUT
request to a URL.
§Errors
This method fails whenever the supplied Url
cannot be parsed.
Sourcepub fn patch<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn patch<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a PATCH
request to a URL.
§Errors
This method fails whenever the supplied Url
cannot be parsed.
Sourcepub fn delete<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn delete<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a DELETE
request to a URL.
§Errors
This method fails whenever the supplied Url
cannot be parsed.
Sourcepub fn head<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn head<U>(&self, url: U) -> RequestBuilderwhere
U: IntoUrl,
Convenience method to make a HEAD
request to a URL.
§Errors
This method fails whenever the supplied Url
cannot be parsed.
Sourcepub fn request<U>(&self, method: Method, url: U) -> RequestBuilderwhere
U: IntoUrl,
pub fn request<U>(&self, method: Method, url: U) -> RequestBuilderwhere
U: IntoUrl,
Start building a Request
with the Method
and Url
.
Returns a RequestBuilder
, which will allow setting headers and
the request body before sending.
§Errors
This method fails whenever the supplied Url
cannot be parsed.
Sourcepub fn execute(
&self,
request: Request,
) -> impl Future<Output = Result<Response, Error>>
pub fn execute( &self, request: Request, ) -> impl Future<Output = Result<Response, Error>>
Executes a Request
.
A Request
can be built manually with Request::new()
or obtained
from a RequestBuilder with RequestBuilder::build()
.
You should prefer to use the RequestBuilder
and
RequestBuilder::send()
.
§Errors
This method fails if there was an error while sending request, redirect loop was detected or redirect limit was exhausted.
Trait Implementations§
Source§impl Clone for LinodeApiHttpClient
impl Clone for LinodeApiHttpClient
Source§fn clone(&self) -> LinodeApiHttpClient
fn clone(&self) -> LinodeApiHttpClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more