Function idempotent [src]
An HTTP method is idempotent if an identical request can be made once
or several times in a row with the same effect while leaving the server
in the same state.
https://developer.mozilla.org/en-US/docs/Glossary/Idempotent
https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.2
Prototype
pub fn idempotent(m: Method) bool Parameters
m: Method Source
pub fn idempotent(m: Method) bool {
return switch (m) {
.GET, .HEAD, .PUT, .DELETE, .OPTIONS, .TRACE => true,
.CONNECT, .POST, .PATCH => false,
};
}