Browse Source
♻ Remove `media_type` from `ORJSONResponse` as it's inherited from the parent class (#5805)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
pull/9648/head
Marcelo Trylesinski
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
0 additions and
2 deletions
-
fastapi/responses.py
|
|
@ -27,8 +27,6 @@ class UJSONResponse(JSONResponse): |
|
|
|
|
|
|
|
|
|
|
|
class ORJSONResponse(JSONResponse): |
|
|
|
media_type = "application/json" |
|
|
|
|
|
|
|
def render(self, content: Any) -> bytes: |
|
|
|
assert orjson is not None, "orjson must be installed to use ORJSONResponse" |
|
|
|
return orjson.dumps( |
|
|
|