Hi,
I've been struggling with reading a 3rd party product feed.
I'm using the following code
<cfhttp url="http://webservices...."> |
<cfhttpparam type="header" name="accept-encoding" value="deflate;q=0">
<cfhttpparam type="header" name="te" value="deflate;q=0">
</cfhttp>
<cfdump var="#cfhttp#"> |
It returns with
struct | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Charset | utf-8 | ||||||||||||||||||||
ErrorDetail | [empty string] | ||||||||||||||||||||
Filecontent | Connection Failure | ||||||||||||||||||||
Header | HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Date: Sat, 18 Feb 2012 13:42:00 GMT Cache-Control: private, max-age=0 X-AspNet-Version: 4.0.30319 Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET | ||||||||||||||||||||
Mimetype | text/xml | ||||||||||||||||||||
Responseheader |
| ||||||||||||||||||||
Statuscode | 200 OK | ||||||||||||||||||||
Text | YES |
If use Firefox Live Headers plugin and view the feed in the browser, it displays fine and also the plugin gives me the information
GET /services/products.asmx...... HTTP/1.1
Host: webservices.......
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cache-Control: max-age=0
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Encoding: deflate
Server: Microsoft-IIS/7.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Sat, 18 Feb 2012 13:34:09 GMT
Content-Length: 9225
I've googled and tried variation of accept-encoding to no avail, I just get connection failure.
Any ideas? Thanks
p.s. also tried
<cfhttpparam type="header" name="accept-encoding" value="no-compression"/>