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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists