Solved

Why is my cfhttp get for xml file creating strange encryption like characters?

Posted on 2014-02-26
4
214 Views
Last Modified: 2014-03-05
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?

Image of xml feed

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#">

Open in new window


I am using CF10
0
Comment
Question by:theideabulb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 52

Expert Comment

by:_agx_
ID: 39889352
Looks like it might just be binary.  What are the rest of the http headers from the dump? Also, what does their API say about format? (Is there a public link?)

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")>
0
 

Accepted Solution

by:
theideabulb earned 0 total points
ID: 39892122
This here was the answer..
http://stackoverflow.com/questions/2974197/cfhttp-encoding-problem

Looks like it was being gzipped twice.  Once I followed these instructions, it works fine.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39894616
Oh, without the cfhttp headers I didn't realize it was gzipped, not just binary. Glad you solved it!
0
 

Author Closing Comment

by:theideabulb
ID: 39905906
I found the answer that worked for my issue.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

736 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question