We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91cc5ae commit 1a6ad9dCopy full SHA for 1a6ad9d
src/hyperapp.rs
@@ -72,6 +72,16 @@ pub fn get_server() -> Option<&'static mut HttpServer> {
72
APP_HELPERS.with(|ctx| ctx.borrow().current_server.map(|ptr| unsafe { &mut *ptr }))
73
}
74
75
+pub fn get_http_request() -> Option<IncomingHttpRequest> {
76
+ APP_HELPERS.with(|helpers| {
77
+ helpers
78
+ .borrow()
79
+ .current_http_context
80
+ .as_ref()
81
+ .map(|ctx| ctx.request.clone())
82
+ })
83
+}
84
+
85
pub fn get_http_method() -> Option<String> {
86
APP_HELPERS.with(|helpers| {
87
helpers
0 commit comments