Skip to main content

check_query_request

Function check_query_request 

Source
pub fn check_query_request(
    method: &str,
    headers: &HeaderMap,
    accept_query: &[&str],
) -> Result<(), QueryRejection>
Expand description

Validates an incoming request as a QUERY per RFC 10008.

accept_query is the list of supported query media ranges; when empty, any media type is accepted (only presence of Content-Type is required).

Returns Ok(()) when the request should be handled as a QUERY, or a QueryRejection describing how to reject it.