actoriwc

Crates.ioactoriwc
lib.rsactoriwc
version1.0.1
sourcesrc
created_at2020-01-20 01:30:17.814186
updated_at2020-01-20 01:30:17.814186
descriptionActori http client.
homepagehttps://actori.t42x.net
repositoryhttps://github.com/actori/actori-web.git
max_upload_size
id200315
size144,975
Christian Haynes (06chaynes)

documentation

https://docs.rs/actoriwc/

README

Actori http client Build Status codecov crates.io Join the chat at https://gitter.im/actori/actori

An HTTP Client

Documentation & community resources

Example

use actori_rt::System;
use actoriwc::Client;
use futures::future::{Future, lazy};

fn main() {
    System::new("test").block_on(lazy(|| {
       let mut client = Client::default();

       client.get("http://www.rust-lang.org") // <- Create request builder
          .header("User-Agent", "Actori-web")
          .send()                             // <- Send http request
          .and_then(|response| {              // <- server http response
               println!("Response: {:?}", response);
               Ok(())
          })
    }));
}
Commit count: 3038

cargo fmt