We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84d79fa commit f8eb112Copy full SHA for f8eb112
drf_api_logger/middleware/api_logger_middleware.py
@@ -164,6 +164,7 @@ def __call__(self, request):
164
"application/vnd.api+json",
165
"application/gzip",
166
"application/octet-stream",
167
+ "text/calendar",
168
]
169
if hasattr(settings, "DRF_API_LOGGER_CONTENT_TYPES") and type(
170
settings.DRF_API_LOGGER_CONTENT_TYPES
@@ -179,6 +180,9 @@ def __call__(self, request):
179
180
response_body = '** Binary File **'
181
elif getattr(response, 'streaming', False):
182
response_body = '** Streaming **'
183
+ elif response.get('content-type') == 'text/calendar':
184
+ response_body = '** Calendar **'
185
+
186
else:
187
if type(response.content) is bytes:
188
response_body = json.loads(response.content.decode())
0 commit comments