mirror of https://github.com/fafhrd91/actix-web
let the reference of HttpRequest in the ServiceRequest could be access
This commit is contained in:
parent
0e138e111f
commit
400062fe7b
|
@ -80,6 +80,12 @@ impl ServiceRequest {
|
|||
ServiceResponse::new(self.0, res.into_body())
|
||||
}
|
||||
|
||||
/// This method returns reference to the request
|
||||
#[inline]
|
||||
pub fn request(&self) -> &HttpRequest {
|
||||
&self.0
|
||||
}
|
||||
|
||||
/// This method returns reference to the request head
|
||||
#[inline]
|
||||
pub fn head(&self) -> &RequestHead {
|
||||
|
|
Loading…
Reference in New Issue