153 ms·
RESTful doesn't mean "JSON" only. It never did and never will. People using RESTful APIs with XML. Also i don't get many things he is saying like: > multiple
by merb 11y ago
RESTful doesn't mean "JSON" only. It never did and never will. People using RESTful APIs with XML.
Also i don't get many things he is saying like:
> multiple parameters for each criteria, e.g. age=10&name=John&company=Foo (but how to implement OR operator?)
I mean seriously? How would one represent a filter in a GET URL... there aren't many solutions.
Also CRUD by Design? What are you talking? REST is not a fucking standard, it's just a way to create your API, you are totally free, to use CRUD or not, your API's could still be within REST if you not use CRUD at all. You could even make REST APIs with GET and POST.
Everything he writes has nothing todo with REST. It's just a design decision.
- andrewstuart2 11y agoRESTful also never meant HTTP. REST is literally just transferring resource state explicitly, via some mutually-understood representation of a resource. JSON just happens to be much more readable as well as pretty familiar for anybody who's written code in a C-like language, and especially familiar for JavaScript developers.
- jazzyk 11y ago>RESTful also never meant HTTP NOt in its original spirit, but it was developed in parallel with HTTP 1.1 (see https://en.wikipedia.org/wiki/Representational_state_transfer https://en.wikipedia.org/wiki/Representational_state_transfe...) and uses the same verbs (GET, POST, ..) as web browsers to transfer data. I agree with the posters who say that just using 4 verbs is CRUD-oriented and semantically just not rich enough to support often complex business operations.
- dragonwriter 11y ago> RESTful also never meant HTTP. Right. HTTP is a (the original and motivating, in fact) RESTful protocol, not a required lower-level protocol on which all RESTful protocols must rest.
- deleted 11y ago[deleted]
- pmelendez 11y ago> I mean seriously? How would one represent a filter in a GET URL... there aren't many solutions. You do have options though. You can make a GET request but send the paramaters not in the URL but in the body in JSON form. However, that would violate the HTTP/1.1 spec.
- merb 11y ago> However, that would violate the HTTP/1.1 spec. As said there aren't many options, one would be a single parameter (jira does that for JQL) and the rest somehow url encoded. However that problem doesn't only happen to rest. Everything on the web suffers from that problem (Jira is a normal Site which doesn't use too much from a Rest API (yet)) so his statement is really falsy.
- dragonwriter 11y ago> How would one represent a filter in a GET URL... there aren't many solutions. One hole in the HTTP method space -- and it results in some weirdness trying to follow REST principles for non-trivial applications over HTTP -- is the absence of a general purpose safe method that takes a request body. (There are some in extensions, such as WebDAV Search's SEARCH method in RFC 5323, but they tend to be overly specific for general use. A generalization of SEARCH to a general purpose, content-type-agnostic query method would be a good addition (much like PATCH was) to the set of HTTP methods.