(request)
| 124 | |
| 125 | @staticmethod |
| 126 | async def get_json(request): |
| 127 | if not request.headers["Content-Type"].startswith("application/json"): |
| 128 | raise QueryError( |
| 129 | PlatformChecker.UNEXPECTED_CONTENT_TYPE_ERROR_MESSAGE.format( |
| 130 | request.headers["Content-Type"] |
| 131 | ) |
| 132 | ) |
| 133 | else: |
| 134 | json = await request.json() |
| 135 | logging.debug(f"JSON {request.url} {request.status}: {json}") |
| 136 | return json |
| 137 | |
| 138 | @staticmethod |
| 139 | async def get_text(request): |
no test coverage detected