27 ms·
The lowest common denominator of SaaS APIs is HTTP. Apart from that, everyone does it different. Some use JSON, some use XML, some use SOAP... Sometimes you au
by wulczer 14y ago
The lowest common denominator of SaaS APIs is HTTP. Apart from that, everyone does it different.
Some use JSON, some use XML, some use SOAP... Sometimes you authenticate with Basic authentication, sometimes you use OAuth 1.0 and need to sign each request, sometimes it's OAuth 2.0 and you just need the token. Oh, and the actual GET parameter for the token is different, too...
There are APIs where you need to set a 'X-API-Version' header to something, or you'll get weird results. The list goes on...
The goal here is to hide all that crap from developers and focus on achieving the desired result.
- thereason 14y agoInstead of hiding it, why don't we ditch it altogether? HTTP is simpler, more direct and easier to debug. By sticking to HTTP, we might get closer to a situation where "everyone does it the same". Life might be easier. Nah, it would never work. Pay no mind. I'm just a fool.
- legutierr 14y agoYou're not a fool, just a dreamer.
- drivebyacct2 14y agoAll of the things in that post use HTTP. (Though SOAP doesn't require HTTP). Did you mean REST? Even then, people often don't get it right, and it's still not as nice a language specific API. (er, application specific api)
- thereason 14y agoI meant plain HTTP without another layer of complexity on top. REST to me is someone's PhD thesis, the man who designed HTTP. When I read it, I interpreted it as an argument for the use of HTTP (his baby) and the benefit of keeping things as simple as they can be kept. But lots of people seem to have taken it to be some sort of API. I'm not sure anyone can definitively say what is and what is not "REST", except Fielding himself. All I see is disagreement. I'm in favor of simplification (or more specifically, not adding complexity where it is not needed). Whether that is "REST" or whatever, I don't know. Using just HTTP is simpler. It worked fine before these other things like XML, SOAP and JSON came along. (And I have a hunch that's why he wrote a thesis to illustrate how HTTP can be used for most things people are trying to do with XML, SOAP and JSON.) That's all I know.