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

hide httpmessage mod

This commit is contained in:
Rob Ede
2021-02-11 22:39:54 +00:00
parent 871ca5e4ae
commit 77efc09362
35 changed files with 125 additions and 98 deletions

View File

@ -82,8 +82,9 @@ impl ClientBuilder {
self
}
/// Maximum supported http major version
/// Supported versions http/1.1, http/2
/// Maximum supported HTTP major version.
///
/// Supported versions are HTTP/1.1 and HTTP/2.
pub fn max_http_version(mut self, val: http::Version) -> Self {
self.max_http_version = Some(val);
self

View File

@ -134,7 +134,7 @@ use self::connect::{Connect, ConnectorWrapper};
///
/// let res = client.get("http://www.rust-lang.org") // <- Create request builder
/// .insert_header(("User-Agent", "Actix-web"))
/// .send() // <- Send http request
/// .send() // <- Send HTTP request
/// .await; // <- send request and wait for response
///
/// println!("Response: {:?}", res);

View File

@ -42,10 +42,10 @@ cfg_if::cfg_if! {
/// let response = awc::Client::new()
/// .get("http://www.rust-lang.org") // <- Create request builder
/// .insert_header(("User-Agent", "Actix-web"))
/// .send() // <- Send http request
/// .send() // <- Send HTTP request
/// .await;
///
/// response.and_then(|response| { // <- server http response
/// response.and_then(|response| { // <- server HTTP response
/// println!("Response: {:?}", response);
/// Ok(())
/// });
@ -219,7 +219,7 @@ impl ClientRequest {
}
/// Force close connection instead of returning it back to connections pool.
/// This setting affect only http/1 connections.
/// This setting affect only HTTP/1 connections.
#[inline]
pub fn force_close(mut self) -> Self {
self.head.set_connection_type(ConnectionType::Close);

View File

@ -109,7 +109,7 @@ impl<S> ClientResponse<S>
where
S: Stream<Item = Result<Bytes, PayloadError>>,
{
/// Loads http response's body.
/// Loads HTTP response's body.
pub fn body(&mut self) -> MessageBody<S> {
MessageBody::new(self)
}
@ -151,7 +151,7 @@ impl<S> fmt::Debug for ClientResponse<S> {
}
}
/// Future that resolves to a complete http message body.
/// Future that resolves to a complete HTTP message body.
pub struct MessageBody<S> {
length: Option<usize>,
err: Option<PayloadError>,