mapscript.OWSRequest¶
- class mapscript.OWSRequest¶
Class for programming OWS services
Attributes
NumParamsint immutable The number of querystring parameters
contenttypechar The content type of the request
httpcookiedatachar Any cookie data associated with the request
postrequestchar Any POST data request
thisownThe membership flag
typeenum MS_REQUEST_TYPE A request type constant
Methods
- __init__()[sumber]¶
Not associated with other mapscript classes. Serves as a message intermediary between an application and MapServer's OWS capabilities. Using it permits creation of lightweight WMS services.
- addParameter(name: char, value: char) void[sumber]¶
Add a request parameter, even if the parameter key was previously set. This is useful when multiple parameters with the same key are required. For example: request.addParameter('SIZE', 'x(100)') request.addParameter('SIZE', 'y(100)')
- getName(index: int) char[sumber]¶
Return the name of the parameter at
indexin the request's array of parameter names.
- getValue(index: int) char[sumber]¶
Return the value of the parameter at
indexin the request's array of parameter values.
- loadParams() int[sumber]¶
Initializes the OWSRequest object from the cgi environment variables
REQUEST_METHOD,QUERY_STRINGandHTTP_COOKIE. Returns the number of name/value pairs collected. Warning: most errors will result in a process exit!
- loadParamsFromPost(postData: char, url: char const) int[sumber]¶
Initializes the OWSRequest object with POST data, along with a the provided URL which is treated like a
QUERY_STRING. Note thatREQUEST_METHOD=POSTand the caller is responsible for setting the correct content type e.g.req.contenttype = "application/xml"
