Post by chris hendrixcan anyone help me figure out how to cfhttp with this api?
https://developers.google.com/qpx-express/
This will dump the results. The rest is up to you.
<cfset qpxFields = '{
"request": {
"slice": [
{
"origin": "MCO",
"destination": "JFK",
"date": "2015-02-13"
}
],
"passengers": {
"adultCount": 1,
"infantInLapCount": 0,
"infantInSeatCount": 0,
"childCount": 0,
"seniorCount": 0
},
"solutions": 20,
"refundable": false
}
}'>
<cfhttp url="https://www.googleapis.com/qpxExpress/v1/trips/search?key=AIzaSyD70yKSjx6qAjio3y6yTzn-i47X8u_EuBE" method="post" result="httpResp" timeout="60">
<cfhttpparam type="header" name="Content-Type" value="application/json" />
<cfhttpparam type="body" value="#serializeJSON(qpxFields)#">
</cfhttp>
<cfoutput>
#httpResp.FileContent#
</cfoutput>