Skip to main content

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:

use torus_http::method::HttpMethod;
assert_eq!(HttpMethod::Get, HttpMethod::from_str_val("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)

use torus_http::method::HttpMethod;
assert!(HttpMethod::other("GET") != HttpMethod::from_str_val("GET"));

Enums§

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