mirror of https://github.com/fafhrd91/actix-web
docs(web): tweak docs for `full_url` (#4032)
This commit is contained in:
parent
8c397f83a3
commit
71d6bdf03e
|
|
@ -89,7 +89,10 @@ impl HttpRequest {
|
|||
}
|
||||
|
||||
/// This method returns mutable reference to the request head.
|
||||
/// panics if multiple references of HTTP request exists.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if multiple references of HTTP request exists.
|
||||
#[inline]
|
||||
pub(crate) fn head_mut(&mut self) -> &mut RequestHead {
|
||||
&mut Rc::get_mut(&mut self.inner).unwrap().head
|
||||
|
|
@ -106,6 +109,12 @@ impl HttpRequest {
|
|||
/// Reconstructed URL is best-effort, using [`connection_info`](HttpRequest::connection_info())
|
||||
/// to get forwarded scheme & host.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics when the reconstructed URL cannot be parsed, such as when the host is malformed.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use actix_web::test::TestRequest;
|
||||
/// let req = TestRequest::with_uri("http://10.1.2.3:8443/api?id=4&name=foo")
|
||||
|
|
|
|||
Loading…
Reference in New Issue