|
||||||||||
|
||||||||||
Related Concepts | Other Library Functions |
function | cgiGetQuery (CGI Testing library) |
Library: omcgi (test version) - CGI testing
Include: omcgi.xin, omutil.xin, builtins.xin |
define function cgiGetQuery into modifiable stream query-shelf
Where:
query-shelf
The cgiGetQuery function that is part of the OmniMark CGI Testing library emulates the behavior of the cgiGetQuery function that is part of the OmniMark CGI library.
When using this function you have to specify the path and name of the file that the capture.xom utility creates, by setting the value of the cgiTestFile variable to the path and name of the appropriate file. Do this by specifying a "-d" option on the command line or in your arguments file:
-d cgiTestFile "d:\inetpub\scripts\cgitest\captured-file.xml"
These two functions have the same name and function call formats. So when you have finished developing and debugging your CGI program and switch from using the CGI Testing library to using the CGI library, you don't have to change any of your code.
The cgiGetQuery function (CGI Testing library) retrieves the query-string data stored in the XML-like file that the capture.xom utility generates. It then decodes the data, and puts the decoded data on a keyed stream shelf of name/value pairs. The key of the shelf item is the name of the data field, and the shelf item's value is the value of that data field. Declare the shelf you want the query-string values placed on as variable
. For example:
declare #process-input has unbuffered declare #process-output has binary-mode include "omutil.xin" include "omcgi.xin" process local stream input-data variable set cgiTestFile to "d:\inetpub\scripts\cgitest\captured-file.xml" cgiGetQuery into input-data
Related Concepts CGI programming with OmniMark |
Other Library Functions cgiGetEnv (CGI Testing library) cgiGetQuery (CGI Testing library) |
---- |