1 stable release
1.0.0 | Oct 12, 2023 |
---|
#15 in #http-status
21KB
193 lines
rhttp_status_code
This library provides definition (in number, u16
) of HTTP status code, which are defined in rfc9110
.
Usage
First, add this in your Cargo.toml:
[dependencies]
rhttp_status_code = { version = "1" }
Then, you can use it in code, like:
fn main() {
// Note: All constants are u16
let _a: u16 = rhttp_status_code::OK;
let _b: u16 = rhttp_status_code::Forbidden;
}
Reference
RFC9110
, Session 15: Link
lib.rs
:
HTTP status code
rhttp_status_code
provides constants for HTTP status code, which have been defined in rfc9110.
Usage
First, add this in your Cargo.toml:
[dependencies]
rhttp_status_code = { version = "1" }
Then, you can use it in code, like:
// Note: All constants are u16
let _ = rhttp_status_code::OK;
let _ = rhttp_status_code::Forbidden;