Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse_json(self, req, name, field):
return get_value(req.json, name, field)
def parse_querystring(self, req, name, field):
"""Pull a querystring value from the request."""
return core.get_value(req.GET, name, field)
def parse_form(self, req, name, field):
"""Pull a form value from the request."""
return core.get_value(req.POST, name, field)
def parse_cookies(self, req, name, field):
"""Pull the value from the cookiejar."""
return core.get_value(req.COOKIES, name, field)
def parse_querystring(self, req, name, field):
"""Pull a querystring value from the request."""
return core.get_value(req.query, name, field)
def parse_form(self, req, name, field):
"""Pull a form value from the request."""
return core.get_value(req.forms, name, field)
def parse_matchdict(self, req, name, field):
"""Pull a value from the request's `matchdict`."""
return core.get_value(req.matchdict, name, field)
def parse_querystring(self, req, name, field):
"""Pull a querystring value from the request."""
return core.get_value(req.params, name, field)
def parse_cookies(self, req, name, field):
"""Pull the value from the cookiejar."""
return core.get_value(req.cookies, name, field)