Skip to content

Sample HTTP requests using CURL

tom-elkin-tw edited this page Sep 14, 2010 · 3 revisions

NOTE: Copy pasting these commands won’t work, as Textile is buggering up the quote characters….! :-/

Logging on / requesting an authentication token from the server:

curl -i -H “Accept: application/json” -X POST -d “user_name=rapidftr&password=rapidftr” http://dev.rapidftr.com:3000/sessions

Fetching list of all children from the server:

curl -i -H “Accept: application/json” -H “Authorization: RFTR_Token <token-goes-here!>” -X GET http://dev.rapidftr.com:3000/children