Module method

Module method 

Source
Expand description

Contains safe wrappers for http methods, note that the conversion is case insensitive so custom methods might not behave as expected

§example:

assert_eq!(HttpMethod::Get, HttpMethod::from_str("GET"));

§Note!!!

due to how it is written right now, you cannot get a custom overwrite for the method (TODO: rephrase this I apparently don’t know english)

assert_eq!(HttpMethod::Other("GET"), HttpMethod::from_str("GET")); // this does not hold

Enums§

HttpMethod
Enum covering most standard http methods and also allowing for custom ones