Skip to content

Commit 4bd906d

Browse files
Support of 'application/vnd.api+json' content type
Logging of Json api standard api requests. https://github.com/django-json-api/django-rest-framework-json-api
1 parent e8194d8 commit 4bd906d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drf_api_logger/middleware/api_logger_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def __call__(self, request):
8181

8282
headers = get_headers(request=request)
8383
method = request.method
84-
if 'content-type' in response and response['content-type'] == 'application/json':
84+
if 'content-type' in response and response['content-type'] == 'application/json' or response['content-type'] == 'application/vnd.api+json':
8585
if getattr(response, 'streaming', False):
8686
response_body = '** Streaming **'
8787
else:

0 commit comments

Comments
 (0)