I am reading a Javascript book where it talks about web services but I find it hard to understand the following sentence as being a drawback of using REST (Representational State Transfer).
One of the biggest drawbacks to using REST is that some browsers support only GET and POST methods, whereas many firewalls allow passage of only GET and POST methods.
I don't really see how this is regarded as a drawback. English is not my 1st language so it could be just me finding it hard.
Can someone elaborate on this?
One of the disadvantages of RESTful APIs is that you can lose the ability to maintain state in REST, such as within sessions. It can also be more difficult for newer developers to use. It's important to understand what makes a REST API RESTful, and why these constraints exist before building your API.
REST allows a greater variety of data formats, whereas SOAP only allows XML. Coupled with JSON (which typically works better with data and offers faster parsing), REST is generally considered easier to work with. Thanks to JSON, REST offers better support for browser clients.
REST supports PUT and DELETE methods as well as GET and POST - so if your app should run in a browser you're limited.
The convention is to use GET to retrieve information, POST to create new object/entity, PUT to update an existing object/entity and DELETE to delete...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With