Talk: Techniques for Building Third-party RESTful Web Services
I gave a talk today for Py Web SF called "Techniques for Building Third-party RESTful Web Services". Aside from covering a lot of material from the book "RESTful Web Services", I also covered a handful of tips and tricks that I discovered were necessary when creating a third-party RESTful Web Service meant for consumption by Web browsers. Here are the slides in OpenOffice.org format.
Comments
The answer, I think, is to go down a level and use httplib directly instead of living with urllib2 and its assumption that all 403s and 404s (for example) should have exceptions raised for them. I've been too lazy to do it yet though. :)
Also, rather than have a script tag load content into a div above the script tag, it's possible to replace the script tag with an automatically generated div.
Apparently the Firefox support for XHR across domains I mentioned is actually a standard. See https://developer.mozilla.org/En/HTTP_access_control and I haven't checked to see what other modern browsers do/will support it.
404 Not Found
The server can not find the requested page:
ironorchid.com/jjinux/articles/restful_web_services/slides.odp (port 80)
Please forward this error screen to ironorchid.com's WebMaster.