我需要在请求中提供以下正文:
type = express&reports [] [name] = document&reports [] [name] = facial_likeity&reports [] [variant] = standard&reports [] [name] = watchlist&reports [] [variant] = full
我尝试使用以下代码:
await this.request({
...
form: {
type: 'express',
reports: [{name: 'document'}, {name: 'facial_similarity', variant: 'standard'}, {name: 'watchlist', variant: 'full'}]
}
});
但是,这将产生以下物体:
type = express&reports [0] [name] = document&reports [1] [name] = facial_likeity&reports [1] [variant] = standard&reports [2] [name] = watchlist&reports [2] [variant] = full
如何生成不带索引的参数名称?
谢谢。