Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using POST as a workaround for the URL character limit

If you have an API and support the POST operation only because of URL length limitations and the passing of complex parameters in the request, can you still say that you have a RESTful architecture?

What the above basically implies is that for this particular (read-only) API, there is no semantic difference between a GET and a POST, so what can be done with a GET can also be done with a POST (but not vice versa due to the limitations).

Would this still make the style of the architecture a RESTful one?

like image 360
Andreas Grech Avatar asked May 10 '11 08:05

Andreas Grech


1 Answers

Technically you are not violating any constraints. However you are severely reducing the self-descriptiveness of requests. This will result in the loss of the ability to cache responses. Being able to cache responses is an essential feature that is needed to build effective REST systems.

like image 147
Darrel Miller Avatar answered Sep 30 '22 01:09

Darrel Miller