Skip to content

Instantly share code, notes, and snippets.

@netmilk
Last active December 20, 2015 09:09
Show Gist options
  • Save netmilk/6105553 to your computer and use it in GitHub Desktop.
Save netmilk/6105553 to your computer and use it in GitHub Desktop.
kolotoc:~ netmilk$ curl --header "Content-Type: application/json" \
--silent --request POST \
--data-binary "{ \"product\":\"1AB23ORM\", \"quantity\": 2 }" \
"http://curltraceparser.apiary.io/shopping-cart" \
--trace - | \
curl-trace-parser
> POST /shopping-cart HTTP/1.1
> 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
>
> { "product":"1AB23ORM", "quantity": 2 }
< HTTP/1.1 201 Created
< Content-Type: application/json
< Date: Mon, 29 Jul 2013 16:23:16 GMT
< X-Apiary-Ratelimit-Limit: 120
< X-Apiary-Ratelimit-Remaining: 119
< transfer-encoding: chunked
< Connection: keep-alive
<
< 32
< { "status": "created", "url": "/shopping-cart/2" }
< 0
<
<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment