4 ms·
I always wonder - is there a reason to use HTTP verbs? It seems to me using POST to request information is better than using GET - instead of putting a url in
by Chris2048 13y ago
I always wonder - is there a reason to use HTTP verbs?
It seems to me using POST to request information is better than using GET - instead of putting a url in the GET request, put it in the body of the POST (plus anything else you want).
I thing a decent JSON-based approach might be easier than bare http, which lacks things that might be needed.
- hhariri 13y agoIf you treat your endpoints as resources, and if you think of the verbs as the operations you can perform on those resources, then you have a discoverable interface. IF you limit everything to a single verb, then you have to define a series of operations...
- Chris2048 13y agoBut this isn't the only way an interface could be discoverable - what about a schema (or a good api doc for humans). This way also couples api to implementation - what if I want different verbs? Suddenly, we stray from the discoverable path.