Trait tetsy_fetch::client::Fetch[][src]

pub trait Fetch: Clone + Send + Sync + 'static {
    type Result: Future<Item = Response, Error = Error> + Send + 'static;
    fn fetch(&self, request: Request, abort: Abort) -> Self::Result;
fn get(&self, url: &str, abort: Abort) -> Self::Result;
fn post(&self, url: &str, abort: Abort) -> Self::Result; }

Types which retrieve content from some URL.

Associated Types

type Result: Future<Item = Response, Error = Error> + Send + 'static[src]

The result future.

Loading content...

Required methods

fn fetch(&self, request: Request, abort: Abort) -> Self::Result[src]

Make a request to given URL

fn get(&self, url: &str, abort: Abort) -> Self::Result[src]

Get content from some URL.

fn post(&self, url: &str, abort: Abort) -> Self::Result[src]

Post content to some URL.

Loading content...

Implementors

impl Fetch for Client[src]

type Result = Box<dyn Future<Item = Response, Error = Error> + Send + 'static>

fn get(&self, url: &str, abort: Abort) -> Self::Result[src]

Get content from some URL.

fn post(&self, url: &str, abort: Abort) -> Self::Result[src]

Post content to some URL.

Loading content...