Skip to content

Non Idempotent Requests

Alexander Krizhanovsky edited this page Sep 27, 2023 · 5 revisions

The consideration of whether a request is considered non-idempotent may depend on specific application, server, and/or service. A special directive allows the definition of a request that will be considered non-idempotent:

nonidempotent <METHOD> <OP> <ARG>;

METHOD is one of supported HTTP methods, such as GET, HEAD, POST, etc. OP is a string matching operator, such as eq, prefix, etc. ARG defines a resource, which must use the custom idempotency policy, e.g. /foo/bar.html or example.com.

One or more of this directive may be specified. The directives apply to one or more locations as defined in the Locations section.

If this directive is not specified, then a non-idempotent request in defined as a request that has an unsafe method.

Below are examples of this directive:

nonidempotent GET prefix "/users/";
nonidempotent POST prefix "/users/";
nonidempotent GET suffix "/data";
Clone this wiki locally