Trait tk_http::client::Client [] [src]

pub trait Client<S, F>: Sink<SinkItem = Box<Codec<S, Future = F>>> where
    F: Future<Item = EncoderDone<S>, Error = Error>, 
{ fn fetch_url(
        &mut self,
        url: &str
    ) -> Box<Future<Item = Response, Error = Error>>
    where
        Self::SinkError: Into<Error>
; }

A marker trait that applies to a Sink that is essentially a HTTP client

It may apply to a single connection or a connection pool. For a single connection the client::Proto implements this interface.

We expect a boxed codec here because we assume that different kinds of requests may be executed though same connection pool. If you want to avoid boxing or have fine grained control, use Proto (which is a Sink) directly.

Required Methods

Simple fetch helper

Implementors