[REBOL] Re: POST vs GET
From: gchiu:compkarori at: 4-Jul-2001 8:24
On Sun, 01 Jul 2001 08:00:39 -0500
John <[john--thousand-hills--net]> wrote:
> The problem is that I can't find any examples of haw to
> change the .r file
> to interact with a
> <FORM [ POST ] vs. [ GET ] action.
>
> Hete is the .r code that accepts the GET action:
>
> set-net [[office--thousand-hills--net]
> MAIL.thousand-hills.tzo.net ]
> cgi: make object! decode-cgi
> system/options/cgi/query-string
if system/options/cgi/request-method = "GET" [
cgi: make object! decode-cgi
system/options/cgi/query-string
]
if system/options/cgi/request-method = "POST" [
len_post: ( 20 + load system/options/cgi/content-length )
post: make string! len_post
while [0 < read-io system/ports/input post len_post ] []
cgi: make object! decode-cgi post
]
--
Graham Chiu
http://www.compkarori.co.nz/index.r