The following functions are useful for accessing properties of a HTTP request, in a Kawa program that is run either as a servlet or a CGI script. These functions can be used from plain Scheme, from KRL (whether in BRL-compatible mode or not), and from XQuery.
If using plain Scheme, you need to do the following before using these functions.
(require 'http)
This is not needed for KRL or XQuery.
Returns the method of the HTTP request, usually
"GET"
or"POST"
. Corresponds to the CGI variableREQUEST_METHOD
.
Returns the URI of the request, not including the query string, or server specification. The is the combination of CGI variables
SCRIPT_NAME
andPATH_INFO
.