2 ms·
At the end of the day, I don't care. If the API I am talking to says they respond to certain information sent via specific method, that's how I send it. Yes, we
by dylan604 5y ago
At the end of the day, I don't care. If the API I am talking to says they respond to certain information sent via specific method, that's how I send it. Yes, we could argue till the cows come home about levels of appropriateness, but I've got better things to do with that time. Like process the data I just received from GET request sent with a body!
- CodesInChaos 5y agoI think "REST" was primarily successful because people wanted a simple json-webapi, not because of its fancier principles.
- hnfong 5y agoI thought "REST" was primarily successful at first because it was a reaction to the overblown XML mess in the early 2000s (that's the "X" in XHR, even though nobody uses it for that any more). I never understood why it became dogmatic though. Arguing for practicality over dogma seems like a losing battle, even in this industry where people are supposed to be relatively practical. I guess that's human nature :-/
- polishdude20 5y agoExactly. If I need to access some api, I'll just read their docs on which methods they want you to use. I never go in thinking "oh if there's a get request for this resource, there must be a post request for this resource like this".
- hakre 5y agoActually I would test the request first. And only if it doesn't work this would require the documentation, so would then test it after the functional test. If the documentation is even needed.
- pacoverdi 5y agoYou'd like my APIs, I keep defining DELETE endpoints with request bodies even though OpenAPI tools scream warnings at me :) Doing a POST on a /delete endpoint seem unnatural and I prefer serializing complex objects to JSON rather than to a query string.