Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

03 June 2014

OpenAir API shock

From the NetSuite OpenAir API documentation (PDF):

Since we are using HTTP, each connection is isolated, and must go through authorization each time. This authorization consists of sending the server an XML data structure consisting of company name, user name, and user password.

... really? In 2014? Ever heard of tokens? I'm not asking for full OAuth, but a simple header-based token mechanism is banal, faster and much more secure than sending XML with user and password for each request.

Oh, your API endpoint is a Perl script. That explains it, I guess... you are not "using HTTP", you are using CGI. Badly.

After this gem, I'm not surprised to learn that they implement simple data-retrieval actions with POST (or PUT -- what?) rather than GET, that the whole API basically consists in exposing database tables as they are, and that their XML is entirely custom. Excuse me, I think I've just thrown up in my mouth...

11 July 2013

Safari extension to show XML

A few months ago I started using Safari for most of my browsing, because I love trackpad gestures and I'm a sucker for smooth animations. However, if there's one thing that Safari gets spectacularly wrong, it's dealing with XML. As far as I know, in Safari 6.x there is no way to display raw XML, the damn browser will always try to launch an external feedreader, and even selecting which feedreader requires industrious hacking that I'd rather avoid. This is particularly annoying when some memory-hungry, battery-burning giant application hijacks this process: in my case, VmWare Fusion will always try to launch one of my images, which is just terrible.

To cut the story short, I wrote a small extension to prevent this horrible process. When I want to have a look at an XML file, I right-click on the link and select "Show me that feed". The result is a slightly-formatted view of the file, in a new tab.

You can download the ShowMeThatFeed Safari extension on BitBucket.

I haven't been a web-plumber for more than 10 years now, so I'm sure it can be dramatically improved -- the formatting in particular is implemented with regexes (argh). Please feel free to fork the BitBucket repository for ShowMeThatFeed, pull requests are very welcome.

UPDATE: Apologies, I've pushed quite a few updates (included some buggy ones!) in the last few hours, but now it should work fine.
Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X