mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
rename BodyLength to BodySize
This commit is contained in:
@ -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};
|
||||
|
@ -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};
|
||||
|
Reference in New Issue
Block a user