- -X POST
- -X PUT
- -H "Content-Type: application/x-www-form-urlencoded"
- -H "Content-Type: application/json"
- form urlencoded: -d "param1=value1¶m2=value2"
- json: -d '{"key1":"value1", "key2":"value2"}'
curl -X GET http://www.google.se
curl -d "param1=value1¶m2=value2" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhost:3000/data
curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST http://localhost:3000/data
https://gist.github.com/subfuzion/08c5d85437d5d4f00e58
No comments:
Post a Comment