Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-02-26
4
Medium Priority
?
225 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

705 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