如图,postman可以调通,但是下面自己写请求确是报错,也不知道错在哪?请求要怎么写?
this.ctx.curl(api, {
method: 'POST',
data: {
"name": "geHsyActiveAla",
"version": "1.0",
"params":{
"patner_code": "w",
"user_id": "322",
"filter_type": "5"
}
},
timeout: 50000,
timing: true,
contentType: 'application/json',
headers: {},
})
raw 对应的
Content-Type
值是text/plain
。但问题是你那 Postman 里明明是个对象,到代码里咋变数组了?