mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
update client mod doc string
This commit is contained in:
parent
23eea54776
commit
bb11fb3d24
@ -1,4 +1,31 @@
|
|||||||
//! HTTP client
|
//! Http client api
|
||||||
|
//!
|
||||||
|
//! ```rust
|
||||||
|
//! # extern crate actix;
|
||||||
|
//! # extern crate actix_web;
|
||||||
|
//! # extern crate futures;
|
||||||
|
//! # use futures::Future;
|
||||||
|
//! use actix_web::client;
|
||||||
|
//!
|
||||||
|
//! fn main() {
|
||||||
|
//! let sys = actix::System::new("test");
|
||||||
|
//!
|
||||||
|
//! actix::Arbiter::handle().spawn({
|
||||||
|
//! client::get("http://www.rust-lang.org") // <- Create request builder
|
||||||
|
//! .header("User-Agent", "Actix-web")
|
||||||
|
//! .finish().unwrap()
|
||||||
|
//! .send() // <- Send http request
|
||||||
|
//! .map_err(|_| ())
|
||||||
|
//! .and_then(|response| { // <- server http response
|
||||||
|
//! println!("Response: {:?}", response);
|
||||||
|
//! # actix::Arbiter::system().do_send(actix::msgs::SystemExit(0));
|
||||||
|
//! Ok(())
|
||||||
|
//! })
|
||||||
|
//! });
|
||||||
|
//!
|
||||||
|
//! sys.run();
|
||||||
|
//! }
|
||||||
|
//! ```
|
||||||
mod connector;
|
mod connector;
|
||||||
mod parser;
|
mod parser;
|
||||||
mod request;
|
mod request;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
//! Static files support.
|
//! Static files support
|
||||||
|
|
||||||
// //! TODO: needs to re-implement actual files handling, current impl blocks
|
|
||||||
use std::{io, cmp};
|
use std::{io, cmp};
|
||||||
use std::io::{Read, Seek};
|
use std::io::{Read, Seek};
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
Loading…
Reference in New Issue
Block a user