mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 14:32:31 +08:00
fix: display indented json for request json body
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
||||||
- fix: catch UnicodeDecodeError when json loads request body
|
- fix: catch UnicodeDecodeError when json loads request body
|
||||||
|
- fix: display indented json for request json body
|
||||||
|
|
||||||
**Changed**
|
**Changed**
|
||||||
|
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ def __stringify_request(request_data):
|
|||||||
try:
|
try:
|
||||||
# request body is in json format
|
# request body is in json format
|
||||||
value = json.loads(value)
|
value = json.loads(value)
|
||||||
|
value = dumps_json(value)
|
||||||
except JSONDecodeError:
|
except JSONDecodeError:
|
||||||
pass
|
pass
|
||||||
value = escape(value)
|
value = escape(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user