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)
| 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]: |