twilio/flask-restful — pull request #105 by leetrout (2013-07-14 08:37:50+00:00)
Title: Add support for mediatype setting manually on request

Enables functionality so `http://localhost:5000/hello/bob?format=csv` returns `greeting,name\r\nhello,bob\r\n` in a browser.

I found myself needing to support the ability to serve up a different mimetype based on a parameter in the query string and couldn't find any way to do that in the docs. Hopefully I didn't overlook it and hack this together for nothing :smirk:

Thought it might be useful to someone else so here's the patch and a working example.