The main disadvantage of the REST web service

I am reading a Javascript book that talks about web services, but I find it difficult to understand the following sentence as the drawback of using REST (State State State Transfer).

One of the biggest drawbacks of using REST is that some browsers only support GET and POST methods, while many firewalls only allow GET and POST methods to pass.

I really do not see how this is seen as a flaw. English is not my first language, so it’s just hard for me to find it.

Can anyone clarify this?

+7
web-services
source share
4 answers

REST supports the methods PUT and DELETE, as well as GET and POST - therefore, if your application should work in a browser, you are limited.

The agreement is to use GET to retrieve information, POST to create a new object / object, PUT to update an existing object / object, and DELETE to delete ...

+4
source share

Restful web service usually uses many methods defined in the Http specification. So, Create methods use Http Post, Read methods use Http Get, update methods Http Put, Delete methods use Http Delete. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html and What HTTP methods correspond to CRUD methods? .

The concern raised in the book is that Put and Delete may not be used with firewalls or in some browsers. I do not know if this is a valid problem. I think that today the Internet infrastructure does an excellent job of this.

In the Qaru Crud article above, the methods include a useful comment:

And since PUT and DELETE are not yet supported by web browsers, it is considered "reload POST" by adding a query string argument like = PUT or method = DELETE to a URI that is POSTED

+2
source share

The disadvantage is that if your application uses DELETE or PUT requests, not every client or network configuration will support this, that is, there will be situations when you cannot deploy it (without workarounds).

I'm not sure if this remains a real problem, and it is easy to solve if you have some filter rewrite requests for clients that cannot issue proper DELETE or PUT.

+1
source share

Well REST Web services use HTTP request methods: POST, GET, DELETE, PUT. Thus, this means that the PUT and DELETE HTTP request methods are not supported. This is a rollback, but there are ways to get around it by manipulating the DTO. This, however, will mean that you are not following the full REST approach.

+1
source share

All Articles