Sacrificial RabbitCode.  Art.  Perversion.  Madness.

Tuesday, January 10. 2006

More RESTful mumblings: PUT and DELETE don't work in a form request method.


Trackbacks

No Trackbacks

Comments
Display comments as (Linear | Threaded)

Since XmlHttpRequest() supports PUT and GET, it might be just the trick to build a browser-based REST API testing tool. Do you know if anyone has built such a thing? I might have to do it myself?

It's not crucial though, because I have tweaked my own REST handler (built in ColdFusion) to look for a URL/Form/Header param called X-Rest-Method and override the actual method with whatever is specified there. That way I can at least do basic testing with PUT and DELETE. Unfortunately I can't send a body with the PUT - that's why an AJAX REST tester would be helpful...

Do you have any tools that you use to test your REST framework?
#1 Avi Flax (Link) on 2006-02-06 10:03 (Reply)
I really like the idea of a URL/Form/Header parameter called X-Rest-Method. I think I'll introduce that into the next version of Meditation.

Currently I have a small test framework for meditation using AJAX at http://bunny.jonnay.net/projects/Meditation/test/gate.php . It is built to test the 3rd party application and user authentication. It uses a chunk of Javascript I call Koi, which is cross platform, and handles PUT and DELETE quite nicely, though I want to give it a little more beef.

cURL is an invaluable tool for testing a REST framework. Check out my entry on it here: http://blog.jonnay.net/archives/587-Debugging-Restuful-Ajax...-Part-Deux..html
#1.1 Jonnay (Link) on 2006-02-06 16:13 (Reply)
Jonnay, I'm glad you like the idea. Could you do me a favor and hold off on talking about the feature for a bit? I'd like to publish it on our company blog first - which we're about to launch.

Your test framework looks impressive, but I'm thinking of something a little simpler and more general-purpose. Maybe I'll try whipping something up to illustrate.

Yeah, cURL rocks. I've used it on my Mac, ever since I saw the examples in the Backpack API. For some reason I didn't think of using it in my Windows system at work, and I've been using PuTTY instead - but honestly it's a bit of a pain. I just downloaded cURL and I'll probably switch to it for my low-level REST debugging.

Thanks for the interesting thoughts and discourse - I've added your feed to my reader (FeedLounge). Later!
Avi
#1.1.1 Avi Flax (Link) on 2006-02-07 09:40 (Reply)
Oops, I didn't realize I couldn't use any HTML here - I had linked Backpack and PuTTY and FeedLounge -- oh well, I guess Google will have to suffice.
#1.1.1.1 Avi Flax (Link) on 2006-02-07 09:42 (Reply)
Sure, I stuffed it in a Todo item on the wiki, but it doesn't get wide exposure (yet). I've already credited you with the idea, should I credit your company as well?

PuTTY is good shit. I love it. A General Purpose AJAX REST debugger application would oh-so-totally kick the bum, and it wouldn't be too hard to build.
#1.1.1.2 Jonnay (Link) on 2006-02-07 15:04 (Reply)

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA