Skip to main content

Module method

Module method 

Source
Expand description

Forked from the http crate — vendored so rama owns its HTTP leaf types. See docs/thirdparty/fork/README.md.

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 rama_http_types::Method and is intended for import through that location primarily.

§Examples

use rama_http_types::Method;

assert_eq!(Method::GET, Method::from_bytes(b"GET").unwrap());
assert!(Method::GET.is_idempotent());
assert_eq!(Method::POST.as_str(), "POST");

Structs§

InvalidMethod
A possible error value when converting Method from bytes.
Method
The Request Method (VERB)