You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the logging middleware uses json.loads(response.body) to parse the response body for logging purposes. This approach is inefficient as it requires reading and parsing the response stream.
Proposed Solution
Use a custom response class to store the original response data, avoiding the need to re-parse the JSON. This can be implemented following the approach discussed in this FastAPI discussion.
Currently, the logging middleware uses
json.loads(response.body)
to parse the response body for logging purposes. This approach is inefficient as it requires reading and parsing the response stream.Proposed Solution
Use a custom response class to store the original response data, avoiding the need to re-parse the JSON. This can be implemented following the approach discussed in this FastAPI discussion.
References
The text was updated successfully, but these errors were encountered: