Support content negotiation in WebAPIResource.
Review Request #1644 — Created June 7, 2010 and submitted
Support content negotiation in WebAPIResource. This introduces support for HTTP Accept-based content negotiation in WebAPIResource. By default, any request to a WebAPIResource will return either XML or JSON data, depending on the HTTP Accept header in the request. The default is JSON. This only happens by default for resources that return a tuple of data, rather than a specific object. It also fixes up a few problems when providing XML results. Namely, when serializing a dictionary where keys are non-strings, or when serializing tuples.
Tested by using curl with different mimetypes.