1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-24 22:37:35 +02:00

rename BodyLength to BodySize

This commit is contained in:
Nikolay Kim
2019-03-27 09:24:55 -07:00
parent b6b37d3ea3
commit faa3ea8e5b
18 changed files with 151 additions and 172 deletions

View File

@ -1,12 +1,35 @@
//! An HTTP Client
//!
//! ```rust
//! # use futures::future::{Future, lazy};
//! use actix_rt::System;
//! use awc::Client;
//!
//! 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", "Actix-web")
//! .send() // <- Send http request
//! .map_err(|_| ())
//! .and_then(|response| { // <- server http response
//! println!("Response: {:?}", response);
//! Ok(())
//! })
//! }));
//! }
//! ```
use std::cell::RefCell;
use std::rc::Rc;
pub use actix_http::client::{ConnectError, InvalidUrl, SendRequestError};
pub use actix_http::error::PayloadError;
pub use actix_http::{http, RequestHead};
pub use actix_http::http;
use actix_http::client::Connector;
use actix_http::http::{HttpTryFrom, Method, Uri};
use actix_http::RequestHead;
mod builder;
mod connect;
@ -20,7 +43,7 @@ pub use self::response::ClientResponse;
use self::connect::{Connect, ConnectorWrapper};
/// An HTTP Client Request
/// An HTTP Client
///
/// ```rust
/// # use futures::future::{Future, lazy};

View File

@ -1,5 +1,4 @@
//! Test Various helpers for Actix applications to use during testing.
//! Test helpers for actix http client to use during testing.
use actix_http::http::header::{Header, IntoHeaderValue};
use actix_http::http::{HeaderName, HttpTryFrom, Version};
use actix_http::{h1, Payload, ResponseHead};