Commit 004ccbc3 authored by liguangyu06's avatar liguangyu06
Browse files

增加响应时间获取

1 merge request!6Master|代码更新归档
Showing with 4 additions and 0 deletions
+4 -0
......@@ -48,6 +48,8 @@ request_body = commonFuc().get_business_data(module, "payload3")
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time = result.elapsed.total_seconds()
result = json.loads(result.content)
print(result)
if result["success"]:
......
......@@ -56,6 +56,8 @@ request_body = commonFuc().get_business_data(module, "payload3")
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time = result.elapsed.total_seconds()
result = json.loads(result.content)
# print(result)
if result["success"]:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment