CURL Request Example

Curl is a command line tool for transferring files with URL syntax. It's available on most Linux/Unix platforms as well as on Mac OS out of the box. Other programming languages (like PHP) know how to work with curl as well, so you may use it there as well.

Here's simple call:

curl -d '<request>...</request>' http://api.clickapost.com/server.php

A more useful call would be including your own XML file in the request. This is done by adding @ before the file name/path:

curl -d '@/home/path/to/file/yourFile.xml' http://api.clickapost.com/server.php

Curl will return the response from the server in XML format.

Please remember, use the TESTING SERVER during testing!

Don't forget: Rule #1 (and the Only One)

All you have to do to submit your test data to the Testing Server is to change server.php to testing_server.php.

curl -d '<request>...</request>' http://api.clickapost.com/testing_server.php
curl -d '@/home/path/to/file/yourFile.xml' http://api.clickapost.com/testing_server.php
 
curl_request_example.txt · Last modified: 2008/12/10 17:38 by peconi
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki