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 9b58c1a commit e8b0651Copy full SHA for e8b0651
src/hyperapp.rs
@@ -37,7 +37,7 @@ thread_local! {
37
pub struct HttpRequestContext {
38
pub request: IncomingHttpRequest,
39
pub response_headers: HashMap<String, String>,
40
- pub response_status: u16,
+ pub response_status: http::StatusCode,
41
}
42
43
pub struct AppContext {
@@ -97,7 +97,7 @@ pub fn add_response_header(key: String, value: String) {
97
98
99
// Set the HTTP response status code
100
-pub fn set_response_status(status: u16) {
+pub fn set_response_status(status: http::StatusCode) {
101
APP_HELPERS.with(|helpers| {
102
if let Some(ctx) = &mut helpers.borrow_mut().current_http_context {
103
ctx.response_status = status;
0 commit comments