pub fn safe(m: Method) bool
An HTTP method is safe if it doesn't alter the state of the server.
https://developer.mozilla.org/en-US/docs/Glossary/Safe/HTTP
https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.1
m: Method
60 61 62 63 64 65
pub fn safe(m: Method) bool { return switch (m) { .GET, .HEAD, .OPTIONS, .TRACE, .QUERY => true, .POST, .PUT, .DELETE, .CONNECT, .PATCH => false, }; }
An HTTP method is safe if it doesn't alter the state of the server.
https://developer.mozilla.org/en-US/docs/Glossary/Safe/HTTP
https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.1