1 unstable release
Uses old Rust 2015
0.10.0 | Feb 20, 2017 |
---|
#9 in #method
Used in uhttp_json_api
7KB
142 lines
uhttp_method -- HTTP request method parser/formatter
This crate provides an HTTP request method parser/formatter, split out from hyper.rs.
Example
use uhttp_method::Method;
assert_eq!("GET".parse(), Ok(Method::Get));
assert!(Method::Get.idempotent());
assert_eq!(format!("{}", Method::Patch), "PATCH");
Usage
This crate can be used through cargo by
adding it as a dependency in Cargo.toml
:
[dependencies]
uhttp_method = "0.10.0"
and importing it in the crate root:
extern crate uhttp_method;
lib.rs
:
This crate provides an HTTP request method parser/formatter, split out from hyper.rs.
Example
use uhttp_method::Method;
assert_eq!("GET".parse(), Ok(Method::Get));
assert!(Method::Get.idempotent());
assert_eq!(format!("{}", Method::Patch), "PATCH");