An immutable multidict, containing both file uploads and text input.
| 480 | |
| 481 | |
| 482 | class FormData(ImmutableMultiDict[str, UploadFile | str]): |
| 483 | class="st">""" |
| 484 | An immutable multidict, containing both file uploads and text input. |
| 485 | class="st">""" |
| 486 | |
| 487 | def __init__( |
| 488 | self, |
| 489 | *args: FormData | Mapping[str, str | UploadFile] | list[tuple[str, str | UploadFile]], |
| 490 | **kwargs: str | UploadFile, |
| 491 | ) -> None: |
| 492 | super().__init__(*args, **kwargs) |
| 493 | |
| 494 | async def close(self) -> None: |
| 495 | for key, value in self.multi_items(): |
| 496 | if isinstance(value, UploadFile): |
| 497 | await value.close() |
| 498 | |
| 499 | |
| 500 | class Headers(Mapping[str, str]): |
no outgoing calls