Skip to content

Commit 4f0ce45

Browse files
committed
fix(deco): load body as json whenever content type has 'application/json'
1 parent 5bc16a8 commit 4f0ce45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data_spec_validator/decorator/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def _collect_data(method, req_qp, req_data) -> Dict:
105105

106106
def _get_dj_payload(request):
107107
content_type = request.headers.get('Content-Type')
108-
if content_type == 'application/json':
108+
if 'application/json' in content_type:
109109
try:
110110
return request.body and json.loads(request.body) or {}
111111
except Exception:

0 commit comments

Comments
 (0)