class mapscript.OWSRequest

Class for programming OWS services



int immutable The number of querystring parameters


char The content type of the request


char Any cookie data associated with the request


char Any POST data request


The membership flag


enum MS_REQUEST_TYPE A request type constant



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[المصدر]

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[المصدر]

Return the name of the parameter at index in the request's array of parameter names.

getValue(index: int) char[المصدر]

Return the value of the parameter at index in the request's array of parameter values.

getValueByName(name: char const) char[المصدر]

Return the value associated with the parameter name

loadParams() int[المصدر]

Initializes the OWSRequest object from the cgi environment variables REQUEST_METHOD, QUERY_STRING and HTTP_COOKIE. Returns the number of name/value pairs collected. Warning: most errors will result in a process exit!

loadParamsFromURL(url: char const) int[المصدر]

Initializes the OWSRequest object from the provided URL which is treated like a QUERY_STRING. Note that REQUEST_METHOD=GET and no post data is assumed in this case.

setParameter(name: char, value: char) void[المصدر]

Set a request parameter. For example:

request.setParameter('REQUEST', 'GetMap') request.setParameter('BBOX', '-107.0,40.0,-106.0,41.0')