Questions about the proper design of REST

I am developing a REST web service and asking questions about the best / right design.

The search method should be POST, since identical requests should not return the same data, right? Also, is it better to run / search / term or / search and use the term post-var?

In addition, if the resource can be updated at any time, whether or not this method to return its GET or POST. It is best to be GET, but because it can change over time, it is not idempotent.

+4
source share
2 answers

Since you are not modifying the resource, I would recommend using GET with the search term in the URL. Caching on the page must be set appropriately (as with all other resources). In this case, you can even completely disable caching.

+1
source

I recommend GET with / search / term To update POST To create something new PUT

0
source

All Articles