Trait Client

Source
pub trait Client {
    type Response: HttpResponse;

    // Required method
    fn execute(
        &self,
        request: Request,
    ) -> Result<Self::Response, Box<dyn Error>>;
}
Expand description

Represents a thing that can send requests.

Modelled after reqwest::Client.

Required Associated Types§

Source

type Response: HttpResponse

Sending a request produces this kind of response.

Required Methods§

Source

fn execute(&self, request: Request) -> Result<Self::Response, Box<dyn Error>>

Send the given request and return the response (or an error).

Implementations on Foreign Types§

Source§

impl Client for Client

Source§

type Response = Response

Source§

fn execute(&self, request: Request) -> Result<Self::Response, Box<dyn Error>>

Implementors§