fix(项目设置): 自定义代码片段执行python接口请求脚本失败

--bug=1010144 --user=lyh 【项目管理】自定义代码片段执行python接口请求脚本失败
https://www.tapd.cn/55049933/s/1101578
This commit is contained in:
shiziyuan9527 2022-02-07 17:33:44 +08:00 committed by shiziyuan9527
parent 38647d6a69
commit 204f31b8eb

View File

@ -45,7 +45,7 @@ function pythonCode(requestObj) {
connType = "HTTPSConnection";
}
let headers = getHeaders(requestHeaders);
requestBody = requestBody ? requestBody : "{}";
requestBody = requestBody ? JSON.stringify(requestBody) : "{}";
requestPath = getRequestPath(requestArguments, requestPath);
let obj = {requestBody, headers, host, requestPath, requestMethod, connType};
return _pythonCodeTemplate(obj);