I am a CGI programmer new to Rebol.
In previous work, I have begun a project
by simulating the CGI environment on my
desktop and redirecting output from stdout
to a file.
How may I create a test query string to run
directly from my desktop?
The attempt that I made was to copy cgiform.r
and modify it as below: Rebol returns
** Script Error: decode-cgi expected args argument of type: any-string.
** Where: cgi: make object! decode-cgi system/options/cgi/query-string
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
print "Content-Type: text/html^/" ;-- Required Page Header
;;;query-string is redefined to simulate input from a form
query-string: "name=tim&[EMAIL PROTECTED]&phone=9005551212"
cgi: make object! decode-cgi system/options/cgi/query-string
print
[
<html><body><h2>*"CGI Results:"</h2>
"Name:" <B> cgi/name </B><P>
"Email:" <B> cgi/email </B><P>
"Phone:" <B> cgi/phone </B><P>
</body><html>
]