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:
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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>,
|
||||
|
Reference in New Issue
Block a user