Skip to content

Instantly share code, notes, and snippets.

@Altreus
Last active August 29, 2015 13:56
Show Gist options
  • Save Altreus/9092873 to your computer and use it in GitHub Desktop.
Save Altreus/9092873 to your computer and use it in GitHub Desktop.
$ http localhost:5000/trope Accept:application/json
HTTP/1.0 200 OK
Content-Length: 130
Content-Type: application/json
Date: Wed, 19 Feb 2014 14:11:31 GMT
Server: HTTP::Server::PSGI
Vary: Accept
{
"items": [
{
"content": "test",
"id": 1,
"summary": "test",
"title": "test"
},
{
"content": "test2",
"id": 2,
"summary": "test2",
"title": "test2"
}
]
}
$ http localhost:5000/trope Accept:text/html
HTTP/1.0 200 OK
Content-Length: 27
Content-Type: text/html
Date: Wed, 19 Feb 2014 14:12:15 GMT
Server: HTTP::Server::PSGI
Vary: Accept
<h1>test</h1><h1>test2</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment