CFHTTP problem - is file-type extension required
Hello,
Running CF8 on Win2003/IIS.
I have the following simple code to check a value from another server:
<cfhttp method="get" URL= "http://server.somewhere.com/websvc/util?a=doHTMLRequest&event=workgroupstat" throwonerror="yes">
<cfset theContent = "#cfhttp.FileContent#">
<cfoutput>#theContent#</cfoutput>
I have also tried:
<cfhttp
method="get"
url="http://server.somewhere.com/websvc/util"> (with and without the ? after the word util)
<cfhttpparam name="a" type="URL" value="doHTMLRequest">
<cfhttpparam name="event" type="URL" value="workgroupstat">
</cfhttp>
The URL that is shown above returns nothing when using it within CFHTTP. If I change the URL to http://www.google.com or whatever I get the code of that page assigned to my theContent variable as expected
From a browser, the URL used in the cfhttp function above works fine. The request returns a simple HTML file with the following code from which I need to pull the agents_available data:
<HTML><HEAD><TITLE>Agents Available</TITLE></HEAD><BODY><H2>workgroup:Chat</H2><H2>agents_available:1</H2><H2>agents_logged_in:1</H2></BODY></HTML>
I cannot understand why I can call any other page from the internet (and our network) and put it into my theContent variable but I can't call this one. Could it be something in the structure of the URL??
I'm thinking that the CFHTTP function cannot properly format the request without the file-type extension.
Any ideas are appreciate. Regards, Jerry
