Skip to content

Commit

Permalink
fix delete method when body length is 0 (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavmule authored and josephmancuso committed Jan 27, 2019
1 parent f63cd98 commit 9659363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion masonite/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def set_post_params(self):
if isinstance(request_body, bytes):
request_body = request_body.decode('utf-8')

return json.loads(request_body)
return json.loads(request_body or '{}')
else:
fields = cgi.FieldStorage(
fp=self.environ['wsgi.input'], environ=self.environ, keep_blank_values=1)
Expand Down

0 comments on commit 9659363

Please sign in to comment.