How to use the REST API with curl
I just created a working example for curl and tested it on linux. Do also URL encode the curly braces. I used the this website to do that. So {"contact_id":"358383"} becomes %7B%22contact_id%22%3A%22358383%22%7D .

I used curl with different parameters. My example is

curl -X POST "http://localhost/sites/all/modules/civicrm/extern/rest.php?entity=Contact&amp;action=get&amp;api_key=XXX&amp;key=XXX&amp;json=%7B%22sequential%22%3A%221%22%2C%22id%22%3A%222%22%7D"


Update: I see I am a bit misleaded by the example generated by the api explorer. JSON for parameters is not mandatory. It is possible to use the following format.

 curl -X POST "http://localhost/sites/all/modules/civicrm/extern/rest.php?entity=Contact&amp;action=get&amp;api_key=XXX&amp;key=XXX&amp;json=1&amp;contact_id=2"


See REST API without JSON just key=value .