Read the JSON request body. Args: default: Value returned when the request body cannot be parsed as JSON. Returns: Parsed JSON data or default.
(self, default: DefaultT | None = None)
| 198 | return await self._request.body() |
| 199 | |
| 200 | async def json(self, default: DefaultT | None = None) -> Any | DefaultT | None: |
| 201 | """Read the JSON request body. |
| 202 | |
| 203 | Args: |
| 204 | default: Value returned when the request body cannot be parsed as JSON. |
| 205 | |
| 206 | Returns: |
| 207 | Parsed JSON data or default. |
| 208 | """ |
| 209 | try: |
| 210 | return await self._request.json() |
| 211 | except Exception: |
| 212 | return default |
| 213 | |
| 214 | async def _load_form_parts(self) -> None: |
| 215 | if self._form_cache is not None and self._files_cache is not None: |
no outgoing calls
no test coverage detected