def load_headers(self, req: Request, schema: Schema) -> MultiDictProxy: """Return headers from the request as a MultiDictProxy.""" return MultiDictProxy(req.headers, schema)
def load_files(self, req, schema): """Return files from the request as a MultiDictProxy.""" return MultiDictProxy(req.files, schema)
def load_querystring(self, req: Request, schema: Schema) -> MultiDictProxy: """Return query params from the request as a MultiDictProxy.""" return MultiDictProxy(req.query_params, schema)
def load_querystring(self, req, schema): """Return query params from the request as a MultiDictProxy.""" return MultiDictProxy(req.args, schema)
def load_form(self, req, schema): """Return form values from the request as a MultiDictProxy.""" return MultiDictProxy(req.form, schema)
def load_cookies(self, req, schema): """Return cookies from the request as a MultiDictProxy.""" return MultiDictProxy(req.cookies, schema)
def load_files(self, req, schema): """Return files from the request as a MultiDictProxy.""" files = ((k, v) for k, v in req.POST.items() if hasattr(v, "file")) return MultiDictProxy(webob.multidict.MultiDict(files), schema)
def load_form(self, req, schema): # remove immutability since we may want to modify the data in `schema_pre_load` return MultiDictProxy(_strip_whitespace(MultiDict(req.form)), schema)
async def load_form(self, req: Request, schema: Schema) -> MultiDictProxy: """Return form values from the request as a MultiDictProxy.""" post_data = await req.form() return MultiDictProxy(post_data, schema)
def load_form(self, req, schema): return MultiDictProxy(req.form, schema)
def load_view_args(self, req, schema): """Return the request's ``view_args`` or ``missing`` if there are none.""" # pylint: disable=no-self-use return MultiDictProxy(req.match_info, schema) or core.missing
async def load_form(self, req: Request, schema: Schema) -> MultiDictProxy: """Return form values from the request as a MultiDictProxy.""" post_data = self._cache.get("post") if post_data is None: self._cache["post"] = await req.post() return MultiDictProxy(self._cache["post"], schema)
def load_matchdict(self, req, schema): """Return the request's ``matchdict`` as a MultiDictProxy.""" return MultiDictProxy(req.matchdict, schema)
def load_querystring(self, req, schema): return MultiDictProxy(req.query, schema)