I have a curl call that works like a charm:
curl -X POST -H 'Content-Type: application/xml' -H "X-ApiVersion: 1.0" -H "X-AccessToken: [api-token]" -d '[xml]' https://www.API.com
I've tried to convert it to coldfusion, but the server kicks back a 406 error on me. I've tried throwing everything I can think of at this problem, but can't get it to work. Any help is appreciated! Here's the CF:
<cfhttp url="#APIURL#" method="POST" result="activity">
<cfhttpparam type="header" name="Content-Type" value="application/xml">
<cfhttpparam type="header" name="X-AccessToken" value="#accesstoken#" />
<cfhttpparam type="header" name="X-ApiVersion" value="1.0" />
<cfhttpparam type="body" encoded="false" value="#trim(request.xml)#" />
</cfhttp>