def _get_param(self, param, allowed_values=None, optional=False):
request_params = self._request_params()<EOL>if param in request_params:<EOL><INDENT>value = request_params[param].lower()<EOL>if allowed_values is not None:<EOL><INDENT>if value in allowed_values:<EOL><INDENT>self.params[param] = value<EOL><DEDENT>else:<EOL><INDENT>raise OWSInvalidParameterValue("<STR_LIT>" % (param, value), value=param)<EOL><DEDENT><DEDENT><DEDENT>elif optional:<EOL><INDENT>self.params[param] = None<EOL><DEDENT>else:<EOL><INDENT>raise OWSMissingParameterValue('<STR_LIT>' % param, value=param)<EOL><DEDENT>return self.params[param]<EOL>
Get parameter in GET request.