Help: Need to CFHTTP this cURL
Related Categories: Coldfusion
I have never had the opportunity to use cURL before. But, now my manager wants to integrate a form submission to our third party vendor, Pivotal Tracker.
The cURL I'm referring to is here: https://www.pivotaltracker.com/help/api?version=v3#add_story
curl -H "X-TrackerToken: TOKEN" -X POST -H "Content-type: application/xml" \
-d "<story><story_type>feature</story_type><name>Fire torpedoes</name><requested_by>James Kirk</requested_by></story>" \
http://www.pivotaltracker.com/services/v3/projects/PROJECT_ID/stories
I have the TOKEN and the PROJECT_ID. I just don't know how to form the call with CFHTTP.
Any help is much appreciated.

[cfhttp
url="http://www.pivotaltracker.com/services/v3/projects...;
method="POST"
result="objGet"]
[cfhttpparam type="HEADER" name="X-TrackerToken" value="TOKEN" /]
[cfhttpparam type="HEADER" name="Content-type" value="application/xml" /]
[cfhttpparam type="XML" value="<story><story_type>feature</story_type><name>Fire torpedoes</name><requested_by>James Kirk</requested_by></story>" /]
[/cfhttp]
$.ajax({
url: url,
data: data,
...
});
thank you. any help would be much appreciated.
$.ajax({
url: "http://www.someserver.com/cfc/mycfhttp.cfc?method=...;,
yadda yadda yadda
});