Skip to content

provide rust definition of RFC9110 HTTP status code

Notifications You must be signed in to change notification settings

caojen/http_status_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

provide rust definition of RFC9110 HTTP status code

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages