Created
November 23, 2013 01:30
-
-
Save statonjr/7609635 to your computer and use it in GitHub Desktop.
YouTypeItWePostIt GET representation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ curl -v -H 'Accept: application/vnd.collection+json' http://www.youtypeitwepostit.com/api/ | |
* About to connect() to www.youtypeitwepostit.com port 80 (#0) | |
* Trying 50.17.185.176... | |
* Connected to www.youtypeitwepostit.com (50.17.185.176) port 80 (#0) | |
> GET /api/ HTTP/1.1 | |
> User-Agent: curl/7.33.0 | |
> Host: www.youtypeitwepostit.com | |
> Accept-Encoding: deflate, gzip | |
> Accept: application/vnd.collection+json | |
> | |
< HTTP/1.1 200 OK | |
< Content-Type: application/json | |
< Date: Sat, 23 Nov 2013 01:28:41 GMT | |
< Etag: "85d4954e3832760e71b0ef28a444be02" | |
< Last-Modified: Thu, 28 Mar 2013 21:51:08 GMT | |
< Content-Length: 645 | |
< Connection: keep-alive | |
< | |
{ | |
"collection" : | |
{ | |
"version" : "1.0", | |
"href" : "http://www.youtypeitwepostit.com/api/", | |
"items" : | |
[ | |
{ | |
"href": "http://www.youtypeitwepostit.com/api/613856331910938", | |
"data": [ | |
{ | |
"name": "text", | |
"value": "Squid!" | |
}, | |
{ | |
"name": "date_posted", | |
"value": "2013-03-28T21:51:08.406Z" | |
} | |
] | |
} | |
] | |
, | |
"template" : { | |
"data" : [ | |
{"prompt" : "Text of message", "name" : "text", "value" : ""} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bummer on the Content-Type header!
If you'd like you can clone the repo and work up a fix that returns the proper header when it is supplied by the client. I think that's the best fix since i'd like to allow web browsers to still see the response.