提交 f7179503 编写于 作者: 泰斯特Test's avatar 泰斯特Test

[fix](interfaceTest/tester.py) header 为空时判断

上级 075658ac
......@@ -182,8 +182,8 @@ class tester:
try:
use_json_data = len(list(filter(lambda x: str(x).lower() == 'content-type' and 'json'
in headers[x], headers.keys()))) > 0
in headers[x], headers.keys() if headers else {}))) > 0
response = session.request(url=url, method=method, json=json_data, headers=headers, verify=False) if use_json_data\
else session.request(url=url, method=method, data=json_data, headers=headers, verify=False)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册