Module method
Expand description
The HTTP request method
This module contains HTTP-method related structs and errors and such. The
main type of this module, Method
, is also reexported at the root of the
crate as http::Method
and is intended for import through that location
primarily.
§Examples
use http::Method;
assert_eq!(Method::GET, Method::from_bytes(b"GET").unwrap());
assert!(Method::GET.is_idempotent());
assert_eq!(Method::POST.as_str(), "POST");
Structs§
- A possible error value when converting
Method
from bytes. - The Request Method (VERB)