Created
July 30, 2013 12:02
-
-
Save netmilk/6112355 to your computer and use it in GitHub Desktop.
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
$ npm install -g curl-trace-parser | |
$ brew install --HEAD \ | |
https://raw.github.com/apiaryio/snowcrash/master/tools/homebrew/snowcrash.rb | |
$ curl --trace - --header "Content-Type: application/json" \ | |
--request POST \ | |
--data-binary "{ \"product\":\"1AB23ORM\", \"quantity\": 2 }" \ | |
"http://curltraceparser.apiary.io/shopping-cart" \ | |
| curl-trace-parser --blueprint \ | |
| snowcrash | |
name: | |
description: | |
resourceGroups: | |
- name: | |
description: | |
resources: | |
- uriTemplate: /shopping-cart | |
name: | |
description: | |
object: | |
methods: | |
- method: POST | |
name: | |
description: | |
requests: | |
- name: | |
description: | |
body: "{ \"product\":\"1AB23ORM\", \"quantity\": 2 }\n" | |
schema: | |
headers: | |
- User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5 | |
Host: curltraceparser.apiary.io | |
Accept: */* | |
Content-Type: application/json | |
Content-Length: 39 | |
responses: | |
- name: 201 | |
description: | |
body: "{ \"status\": \"created\", \"url\": \"/shopping-cart/2\" }\n" | |
schema: | |
headers: | |
- Content-Type: application/json | |
Date: Tue, 30 Jul 2013 11:59:18 GMT | |
X-Apiary-Ratelimit-Limit: 120 | |
X-Apiary-Ratelimit-Remaining: 118 | |
Content-Length: 50 | |
Connection: keep-alive | |
OK. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment