Skip to content

Commit

Permalink
update client mod doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Apr 10, 2018
1 parent 23eea54 commit bb11fb3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
29 changes: 28 additions & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -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 parser;
mod request;
Expand Down
4 changes: 1 addition & 3 deletions src/fs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! Static files support.

// //! TODO: needs to re-implement actual files handling, current impl blocks
//! Static files support
use std::{io, cmp};
use std::io::{Read, Seek};
use std::fmt::Write;
Expand Down

0 comments on commit bb11fb3

Please sign in to comment.