Yer cheers, already got that far form your examples in the tcpclient2
archive (in about 30 secs)

Those RFC's are a real pain however. All I want to do is a HTTP form POST of
s single prenamed form field.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2001 15:48
To: CF-Talk
Subject: RE: CFHTTP Replacement


At 09:28 AM 10/26/2001 +0100, you wrote:
>Anyone got any resources on building up HTTP requests ?

There are a couple RFC's that describe http 1.0 and http 1.1.

http 1.0 is the easiest. There are three "verbs" used: GET, POST and HEAD. 
Can you guess what they do from simply from using html forms? :) Well, you 
probably can. The POST format is a rather tangled businesses to decode, but 
no more than raw mime. The HEAD verb returns only the header information 
about a page but doesn't send the page itself.

If you wanted to grab the contact page from HOF using http 1.0 you'd send 
the command sequence:

         <cfset obj.SendRN("GET /hof/body/Contact.cfm HTTP/1.0")>
         <cfset obj.SendRN("")>

. after you've opened a connection to houseoffusion.com:80 of course. And 
you'd get back the complete page just as the server sends it with all the 
headers at the top, then the page contents after a cr/lf blank line.

That's the basics.

If it's a virtual host (many web sites using only one ip) you'd have to use 
http 1.1 to tell it which website you're interested in:

         <cfset obj.SendRN("GET /index.html HTTP/1.1")>
         <cfset obj.SendRN("host: www.houseoffusion.com")>
         <cfset obj.SendRN("")>

That should be enough to get you started.

--min

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to