Skip to content

Instantly share code, notes, and snippets.

@thmsobrmlr
thmsobrmlr / restful_curl.sh
Created July 10, 2013 10:08
RESTFul Request with Curl.
# Set request method:
curl -X DELETE http://localhost:3000/books/1
# Set request parameters:
curl -d "book[title]=Test" -d "book[copyright]=1998" http://localhost:3000/books
# Set header:
curl -H "Accept: text/xml" http://localhost:3000/books/sections/1