mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
update api doc example for client and add panic info for connection_info
This commit is contained in:
parent
f410f3330f
commit
69456991f6
@ -1,7 +1,7 @@
|
|||||||
//! An HTTP Client
|
//! An HTTP Client
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! # use futures::future::{Future, lazy};
|
//! use futures::future::{lazy, Future};
|
||||||
//! use actix_rt::System;
|
//! use actix_rt::System;
|
||||||
//! use awc::Client;
|
//! use awc::Client;
|
||||||
//!
|
//!
|
||||||
|
@ -186,6 +186,9 @@ impl HttpRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get *ConnectionInfo* for the current request.
|
/// Get *ConnectionInfo* for the current request.
|
||||||
|
///
|
||||||
|
/// This method panics if request's extensions container is already
|
||||||
|
/// borrowed.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn connection_info(&self) -> Ref<ConnectionInfo> {
|
pub fn connection_info(&self) -> Ref<ConnectionInfo> {
|
||||||
ConnectionInfo::get(self.head(), &*self.app_config())
|
ConnectionInfo::get(self.head(), &*self.app_config())
|
||||||
|
Loading…
Reference in New Issue
Block a user