fix: display indented json for request json body

This commit is contained in:
debugtalk
2019-12-18 16:27:25 +08:00
parent 825758bff4
commit 7314c43603
2 changed files with 2 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
**Fixed**
- fix: catch UnicodeDecodeError when json loads request body
- fix: display indented json for request json body
**Changed**

View File

@@ -162,6 +162,7 @@ def __stringify_request(request_data):
try:
# request body is in json format
value = json.loads(value)
value = dumps_json(value)
except JSONDecodeError:
pass
value = escape(value)