I'm still lost on how to use POST to create an object! containing the
values submitted in a form. The following function creates a string!
value called 'data, correct?
retrieve-user-data: func [] [
either system/options/cgi/request-method = "POST" [
data: make string! 2002
read-io system/ports/input data 2000
][
cgi: make object! decode-cgi-query
system/options/cgi/query-string
]
]
The /Core user's guide says "a good format for POST data is to use
a REBOL dialect and create a simple parser. The POST data can be
loaded and parsed as a block."
Why isn't there a built-in function for parsing POST data into an
object? Am I missing something?
-Ryan
> Ryan,
>
> It appears as though you will need to read from system/ports/input to
> receive the actual POST query data. This process is explained in more
> detail in the "REBOL/Core User's Guide," which is available in pdf
> format online at:
>
> http://www.rebol.com/download_manual.html
>
> or the print version is available through www.rebolpress.com .
>
> The relevent section begins on page 402, with POST explained on the
> following two pages.
>
> Hope this helps.
>
> - Scott
>
> ----- Original Message -----
> From: "Ryan C. Christiansen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 19, 2001 5:19 PM
> Subject: [REBOL] works for GET, not POST
>
>
> > I'm using the following function, which is derived from the "Official
> > Guide," for CGI.
> >
> > retrieve-user-data: func [] [
> > return make object! decode-cgi
> > either system/options/cgi/request-method = "POST" [
> > input
> > ][
> > system/options/cgi/query-string
> > ]
> > ]
> >
> >
> > I use it as such:
> >
> > cgi-input: retrieve-user-data
> >
> > to give me an object containing the input values.
> >
> > My usage is working for GET operations but not for POST. What am
> > I doing wrong?
> >
> > -Ryan
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.