docs
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
:sig
|
||||
void Request::set_status(s32 code, String reason = "")
|
||||
|
||||
:params
|
||||
code : HTTP status code
|
||||
reason : optional reason phrase override
|
||||
return value : none
|
||||
|
||||
:see
|
||||
0_Request
|
||||
redirect
|
||||
set_cookie
|
||||
|
||||
:content
|
||||
Sets the request status line and mirrors the numeric status into `context.flags.status`. When `reason` is omitted, common HTTP status codes get their standard phrase. FastCGI-style requests use a `Status:` prefix; other requests use `HTTP/1.1`.
|
||||
|
||||
```cpp
|
||||
context.set_status(404, "Not Found");
|
||||
```
|
||||
Reference in New Issue
Block a user