No. PUT may be idempotent, but it also has a certain meaning. The request body in the PUT should be used to replace the resource in the URI.
With POST such assumptions are made. Please note that using a POST request means that the request may not be idempotent, in some cases it may still be.
However, you can do this with PUT , but for this you need to go through an extra hoop. Basically, you can create a โquery resourceโ using PUT , and then use GET immediately after receiving the results of this query resource. Perhaps this was what you needed, but it is the most RESTful, because the result of the query may be related. (something is completely missing if you use POST requests).
Evert source share