theideabulb
asked on
Why is my cfhttp get for xml file creating strange encryption like characters?
The XML feed looks great, but when I do a simple http call to get the data, it is "encrypting" it or doing something odd. Anyone know what causes this and what to do to fix it?
This here is what I am doing:
I am using CF10
This here is what I am doing:
<cfset feedURL="http://api.walmartlabs.com/v1/feeds/items?apiKey=xxx&categoryId=xxx&format=xml">
<cfhttp method="get" url="#feedURL#" result="feedItems"></cfhttp>
<cfdump var="#feedItems#">
I am using CF10
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oh, without the cfhttp headers I didn't realize it was gzipped, not just binary. Glad you solved it!
ASKER
I found the answer that worked for my issue.
In the mean time, if you have confirmed it's binary ie IsBinary(), try converting it to a string:
<cfset feedAsString = charsetEncode(feedItems, "UTF-8")>