pub fn validate_method(
request: &Request<Body>,
expected_method: Method,
) -> Result<(), ProtocolError>
Expand description
Compares the request method with an expected method and returns
ProtocolErrorType::HttpMethodNotAllowed
if there is a mismatch.
Can be useful for implementing RequestHttpConvert::from_http_request
.