Skip to content

Instantly share code, notes, and snippets.

@thmsobrmlr
Created July 10, 2013 10:08
Show Gist options
  • Save thmsobrmlr/5965150 to your computer and use it in GitHub Desktop.
Save thmsobrmlr/5965150 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment