响应数据
{ : "status":"1", : "code":500002, : "msg":"登录信息过期,请重新登录", : "details": : [ : ], : "data":null }
解决方案:
# 第一步:登录的响应数据中取出token:添加/后置处理器,jp@gc - JSON/YAML Path Extractor_${lgtoken} # Destination Variable Name:lgtoken # JSONPath Expression:data["token"] # Default Value:lgtoken,null { : "status":"1", : "code":20000, : "msg":"请求成功", : "details":null, : "data": : { : : "id":2, : : "userName":"jo", : : "userRealname":"蒋力改", : : "token":"9c92e680a8a4485da967a18d3a3ac557" : } } # 第二步: { "body": { "id": "", "loaner": "辛有志${__time(MMdd)}${n}", "proveDate": "2020-04-01", "proveMoney": "1", "proveFiles": "[{"originalFilename":"20191010-1.png","url":"http://fdfiletest.shoujinwang.com/ledger%2Fuploads%2F685e286c-df64-4a4b-bd31-3f9e291754fd.png?e=1586942386&token=-hCGOSL0zc86pTuoPECznrECWxBeQ7xUjUNXURIP:NWtNZb6wonzrPG4L1GPcQeF8IKo=","key":"ledger/uploads/685e286c-df64-4a4b-bd31-3f9e291754fd.png"}]", "otherInfo": "辛有志${__time(MMdd)}${n} X${__time(yyyyMMddHH)}${n} J${__time(yyyyMMddHH)}${n} W${__time(yyyyMMddHH)}${n}", "fdRepayPlanRegisteVos": [], "fxRepayPlanRegisteVos": [], "auditStatus": "NOT", "auditStatusText": "待提交" }, "token": "${lgtoken}", #请求中的token参数化 "timestamp": "20200415161950" }