Trait sota::http::http_client::Client [] [src]

pub trait Client {
    fn chan_request(&self, req: Request, resp_tx: Sender<Response>);

    fn send_request(&self, req: Request) -> Receiver<Response> { ... }
    fn get(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response> { ... }
    fn post(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response> { ... }
    fn put(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response> { ... }
    fn is_testing(&self) -> bool { ... }
}

Abstracts a particular HTTP Client implementation with methods for sending Requests and receiving asynchronous Responses.

Required Methods

fn chan_request(&self, req: Request, resp_tx: Sender<Response>)

Provided Methods

fn send_request(&self, req: Request) -> Receiver<Response>

fn get(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response>

fn post(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response>

fn put(&self, url: Url, body: Option<Vec<u8>>) -> Receiver<Response>

fn is_testing(&self) -> bool

Implementors