Forum Moderators: open

Message Too Old, No Replies

Cfhttp and asp

What is the equivalent in ASP of CFHTTP from ColdFusion?

         

9thsign

6:06 pm on Mar 1, 2002 (gmt 0)

10+ Year Member



I have a few dynamic reports that are database driven and I need to capture the output in a variable to write it to a static html page.

In ColdFusion I use CFHTTP, I need to do it in ASP.

Does anyone know how I can accomplish this?

I have searched the internet, and came up empty. Any help would be appreciated.

Thanks in advance

cyril kearney

4:18 am on Mar 3, 2002 (gmt 0)

10+ Year Member



CFHTTP lets you execute GET and POST operations on files.

Here is the syntax of CFHTTP
[livedocs.macromedia.com...]

9thsign

9:55 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



Yes, I use CFHTTP throughout a few sections on a couple of sites.

The problem was getting that same functionality from asp to dump dynamic content of an entire page (including HTML) into one variable.

But I have found a way to do it now, thanks anyways.

cyril kearney

2:31 am on Mar 7, 2002 (gmt 0)

10+ Year Member



Since many people read these forums, I will note that in most implementations GETs and POSTs are not interchangable.

GETs have a limit of about 1800 characters I have found. POSTs don't have this limitation, so they will work for very large input

sun818

4:29 am on Mar 22, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do a search on the ColdFusion support forum for "static html output" and you'll find many discussions on the topic. But would converting your URL to look like "static" pages be good enough? :: webforums.macromedia.com/coldfusion/messageview.cfm?catid=7&threadid=186796

The example I implemented was from Ben Ellison which makes the browser see the page using either URL ::
tekgems.com/id.cfm?itemnum=3com_dongle002_3668
tekgems.com/id.cfm/itemnum/3com_dongle002_3668

william_dw

11:13 pm on Mar 29, 2002 (gmt 0)

10+ Year Member



For anyone else who needs to retrieve web pages via ASP, here's a quick snippet
(The MS Server XML Component is installed with the latest microsoft data access librarys, so every host should support it out of the box, no sillyness with custom components).

-- start code snippet --
'Create object
Set objXML = CreateObject("MSXML2.ServerXMLHTTP")

'Load the url
'*Note: MSXML can also do POST requests, simply search for 'ServerXMLHTTP documentation' or similar on google/microsoft
objXML.open "GET", "http://www.xxx.com/", False

objXML.send()

page_Source = objXML.responseText
page_Status = objXML.status

' clean up
Set objXML = Nothing
-- end code snippet --