3 releases
0.1.2 | Nov 12, 2022 |
---|---|
0.1.1 | Nov 12, 2022 |
0.1.0 | Nov 12, 2022 |
#18 in #http-status
3KB
Satuses
HTTP status utility for Rust.
Cargo
Put this in your Cargo.toml:
[dependencies]
statuses = "0.1"
Usage
message(code)
Returns the status message string for a known HTTP status code.
fn main() {
// Unprocessable Entity
println!("{}", statuses::message("422"));
}
code(message)
Returns the status code string for a known HTTP status message.
fn main() {
// 403
println!("{}", statuses::code("Forbidden"));
}
Dependencies
~3MB