Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): David Byers / David Byers (David Byers)
Created: 05/20/2014
Components: Net Protocols, HTTP
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / All users will encounter
Locale/System: English / Mac 10.9
Vote Count: 2
I've run into a problem (I think) with http in ColdFusion 11 and I'm wondering if this is a known issue. I'm doing a pretty straightforward HTTP call to the Google Places API in order to retrieve a JSON packet of information.
I've got this script running on two Ubuntu VMs (Parallels on my Mac).
One running Ubuntu 12.04 running CF10 update 13.
One running Ubuntu 14.04 running CF11.
The CF10 request returns the JSON packet as expected, but the CF11 request returns a 404 response from Google.
Have you heard of any problems with http() in CF11?
Here's my code. The values for "reference" and "api Key" are variables, but I've hard coded them here if you wanted to test it.
<cfscript>
// Set up an HTTP service //
variables.HTTP = new http();
// Set the method, character set and the URL //
variables.HTTP.setMethod('GET');
variables.HTTP.setCharSet('UTF-8');
variables.HTTP.setURL('https://maps.googleapis.com/maps/api/place/details/json');
// Add the reference //
variables.HTTP.addParam(
type='url',
name='reference',
value='CoQBdwAAACTLpBJRqdorlL1nGkNWOyx2KerLJI96cY9r_3TGa03vW9DRxnzFmO9sDZcOfB_q8z0px3ZVPucHhxENiM_OSWL5UcKYShONSt1j64btdIoSrfAC1i4iT0mLzauve0DTSeTNKk6HqvyegC25mgvxkwXxRDXwj8DKUUhVvU3EYnLMEhCcbOIGQcnAtvfju-ZzJKzRGhT7tQedKCpZoD8IYPfcvSs36mBzmA'
);
// Add the Google API Key //
variables.HTTP.addParam(
type='url',
name='key',
value='AIzaSyBNu5eNqIhmumwmlnbBVxtcln4lhXuc5JM'
);
// Add the sensor parameter //
variables.HTTP.addParam(
type='url',
name='sensor',
value='false'
);
// Send the request to Google //
variables.Response = variables.HTTP.send().getPrefix();
writeOutput(variables.Response.fileContent);
</cfscript>
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3763348
External Customer Info:
External Company:
External Customer Name: myScreenNameWasTaken
External Customer Email:
External Test Config: Parallels Virtual Machines running on a MacBook Pro.
1 x Ubuntu 12.04 running ColdFusion 10 updater 13
1 x Ubuntu 14.04 running ColdFusion 11
Attachments:
Comments: