I am attempting to run a simple REST api with ColdFusion and receiving same error regardless of attempt. The call works fine in Postman with the 4 params. But cant recreate in ColdFusion CFHTTP.
<cfhttp url="https://api.sandbox.scoutrfp.com/v3/contracts" method="GET" result="ITEM_INFO">
<cfhttpparam type="header" name="X-Api-Key" value="#variables.API_KEY#">
<cfhttpparam type="header" name="X-User-Token" value="#variables.USER_TOKEN#">
<cfhttpparam type="header" name="Content-Type" value="application/vnd.api+json">
<cfhttpparam type="header" name="X-User-Email" value="#variables.USER_EMAIL#">
</cfhttp>
I have replaced the header with type cgi as
<cfhttpparam type="CGI" encoded="false" name="Content_Type" value="application/vnd.api+json">
I have added all temp headers that postman sends.
Always same error: Missing or incorrect Content-Type header for JSON:API: Expected request to include 'Content-Type: application/vnd.api+json
Seems CFHTTP tag not properly sending value "application/vnd.api+json" - perhaps encoding it incorrectly in some fashion? Is there another means to send this Content-Type via CFHTTP to get a response?