Last active
May 11, 2016 08:32
-
-
Save davidbarkhuizen/2f0d0a8e9eb8a47b6cc273d2abf1b166 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| http://stackoverflow.com/questions/14978411/http-post-and-get-using-curl-in-linux | |
| # make post request with json loaded from file post.json | |
| curl -X POST -d @post.json http://example.com/path/to/resource --header "Content-Type:application/json" | |
| # make a get request, accepting all content tyopes | |
| curl -i -H "Accept: *" -H "Content-Type: application/json" -X GET http://hostname/resource |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment