rhttp_status_code

Crates.iorhttp_status_code
lib.rsrhttp_status_code
version1.0.0
sourcesrc
created_at2023-10-12 08:24:02.203455
updated_at2023-10-12 08:24:02.203455
descriptionRFC9110 HTTP Status Code
homepage
repositoryhttps://github.com/caojen/http_status_code
max_upload_size
id1001050
size20,143
(caojen)

documentation

README

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

Commit count: 8

cargo fmt