Skip to content

Instantly share code, notes, and snippets.

@nicolaiarocci
Created February 3, 2012 10:31
Show Gist options
  • Save nicolaiarocci/1729566 to your computer and use it in GitHub Desktop.
Save nicolaiarocci/1729566 to your computer and use it in GitHub Desktop.
Test for Mimerender Flask
$ curl -H "Accept: application/html" localhost:5000/
<html><body>Hello, World!</body></html>
$ curl -H "Accept: application/xml" localhost:5000/
<message>Hello, World!</message>
$ curl -H "Accept: application/json" localhost:5000/
{'message':'Hello, World!'}
$ curl -H "Accept: text/plain" localhost:5000/
Hello, World!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment