method Reply.withStatus
A copy of the reply with another status code.
Example:
use std.http { Reply }
fn main() io {
let r = Reply.text("created").withStatus(201)
print("{r.status}")
}Output
201
pub(api) fn withStatus(code: i64) -> ReplySince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
code | i64 |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/http/http.oxl:2926