Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

6
Help with CURL to CFHTTP
Post Body

Hi there,

I have been asked to connect to an API by a client and can easily do so with Postman but when I try and use Cfhttp I get 405 and 406 errors.

I am trying to do a straighforward GET, the following CURL works

curl -X GET -k -H 'Authorization: Bearer NjM2YTFlMGFjYTM5NTczNzdiNGI1MmRjMzY5ZDhkMjBhZmEwMGZiNDU2YzBmYWUyNWIyMjRjOGE3NWNmMDliNA' -i 'https://*******/api/passports/000184'

When I use Cfhttp I am doing the following;

<cfset passportURL = 'https://\*\*\*\*\*\*\*/api/passports/' & [arguments.Id](https://arguments.Id) />

<cfset bearerToken = 'NjM2YTFlMGFjYTM5NTczNzdiNGI1MmRjMzY5ZDhkMjBhZmEwMGZiNDU2YzBmYWUyNWIyMjRjOGE3NWNmMDliNA' />

<cfhttp url="#passportURL#" method="GET" result="passportResult">

<cfhttpparam type="header" name="Authorization" value="Bearer #bearerToken#" />

</cfhttp>

Can anyone see what I am doing wrong?

Author
Account Strength
90%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
691
Link Karma
293
Comment Karma
398
Profile updated: 2 days ago
Posts updated: 3 weeks ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago