Skip to content

Commit 030ef32

Browse files
Merge pull request #146 from EyeSeeTea/fix/api-proxy-harboard-content-type
[fix] don't fail if the content type JSON is not specified in the request
2 parents 9ee0d7a + 0233fe6 commit 030ef32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/d2_docker/api/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ def rm_instance():
108108

109109
def get_request_json(request):
110110
try:
111-
return request.json
111+
# Use force so we don't fail even if the content type JSON is not specified in the request
112+
return request.get_json(force=True)
112113
except BadRequest:
113114
return None
114115

0 commit comments

Comments
 (0)