MCPcopy
hub / github.com/pallets/werkzeug / values

Method values

src/werkzeug/wrappers/request.py:449–475  ·  view source on GitHub ↗

A :class:`werkzeug.datastructures.CombinedMultiDict` that combines :attr:`args` and :attr:`form`. For GET requests, only ``args`` are present, not ``form``. .. versionchanged:: 2.0 For GET requests, only ``args`` are present, not ``form``.

(self)

Source from the content-addressed store, hash-verified

447
448 @cached_property
449 def values(self) -> CombinedMultiDict[str, str]:
450 """A :class:`werkzeug.datastructures.CombinedMultiDict` that
451 combines :attr:`args` and :attr:`form`.
452
453 For GET requests, only ``args`` are present, not ``form``.
454
455 .. versionchanged:: 2.0
456 For GET requests, only ``args`` are present, not ``form``.
457 """
458 sources = [self.args]
459
460 if self.method != "GET":
461 # GET requests can have a body, and some caching proxies
462 # might not treat that differently than a normal GET
463 # request, allowing form data to "invisibly" affect the
464 # cache without indication in the query string / URL.
465 sources.append(self.form)
466
467 args = []
468
469 for d in sources:
470 if not isinstance(d, MultiDict):
471 d = MultiDict(d)
472
473 args.append(d)
474
475 return CombinedMultiDict(args)
476
477 @cached_property
478 def files(self) -> ImmutableMultiDict[str, FileStorage]:

Callers 10

closeMethod · 0.45
_add_cookies_to_wsgiMethod · 0.45
_find_exceptionsFunction · 0.45
_iter_module_pathsFunction · 0.45
_rulesMethod · 0.45
updateMethod · 0.45
_update_stateMethod · 0.45
_syncMethod · 0.45
processMethod · 0.45
processMethod · 0.45

Calls 3

MultiDictClass · 0.85
CombinedMultiDictClass · 0.85
appendMethod · 0.80

Tested by 2

closeMethod · 0.36
_add_cookies_to_wsgiMethod · 0.36