http://localhost:6543/search/bing?q=foo&format=json vs http://play.fxhome.mozillalabs.com:4321/search/bing?q=foo&format=json What happens: local: JSON string is returned with html property containing all markup, regardless of format argument. play: JSON string is returned. JSON contents depends on format argument.
Looks like the problem is in /pancake-web/pancake/web/views/search.py. Params are not passed through directly, but added by hand to a new params object that is then sent to the remote server.
Also strange: the JSON property names for this API are TitleCase. This seems at odds with the formats used in other APIs.
Problems with format argument resolved in https://bitbucket.org/mozillapancake/pancake/changeset/cbc9690f6165. Looking into JSON keys.
It looks like we're passing API results directly from bing/twitter to the response. I'm going to add views for these that format the JSON to match other APIs we use.