Nov 25, 2013

CURL: Post request with payload/content body

Curl Command with a JSON Data
curl --header "Content-Type: application/json" -X POST -d '{"state": "----X----"}' http://localhost:8888/_ah/api/tictactoe/v1/board

Curl Command with POST Parameter
curl  -X POST -d 'key1=value1&key2=value2&' http://localhost:8888/_ah/api/tictactoe/v1/board







Curl Command with GET Parameter
curl  -X GET -d 'key1=value1&key2=value2&' http://localhost:8888/_ah/api/tictactoe/v1/board


This sample command get from tictactoe

No comments: