mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
Merge pull request #124 from DoumanAsh/show_hidden
Show Request's hidden methods
This commit is contained in:
commit
c10dedf7e4
@ -203,11 +203,10 @@ impl<S> HttpRequest<S> {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub fn uri(&self) -> &Uri { &self.as_ref().uri }
|
pub fn uri(&self) -> &Uri { &self.as_ref().uri }
|
||||||
|
|
||||||
#[doc(hidden)]
|
/// Returns mutable the Request Uri.
|
||||||
#[inline]
|
|
||||||
/// Modify the Request Uri.
|
|
||||||
///
|
///
|
||||||
/// This might be useful for middlewares, i.e. path normalization
|
/// This might be useful for middlewares, e.g. path normalization.
|
||||||
|
#[inline]
|
||||||
pub fn uri_mut(&mut self) -> &mut Uri {
|
pub fn uri_mut(&mut self) -> &mut Uri {
|
||||||
&mut self.as_mut().uri
|
&mut self.as_mut().uri
|
||||||
}
|
}
|
||||||
@ -222,7 +221,9 @@ impl<S> HttpRequest<S> {
|
|||||||
self.as_ref().version
|
self.as_ref().version
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
///Returns mutable Request's headers.
|
||||||
|
///
|
||||||
|
///This is intended to be used by middleware.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn headers_mut(&mut self) -> &mut HeaderMap {
|
pub fn headers_mut(&mut self) -> &mut HeaderMap {
|
||||||
&mut self.as_mut().headers
|
&mut self.as_mut().headers
|
||||||
|
Loading…
Reference in New Issue
Block a user