发送数组作为 x-www-form-urlencoded 的一部分数组、www、urlencoded、form

2023-09-08 08:51:50 作者:一壶酒化流年

我想使用邮递员发送数组.请求如下所示:

I want to send array using postman. the request looks like this:

我正在使用邮递员来执行请求.我在互联网上发现通过表单数据或原始数据发送数组.但我需要将它们作为 x-www-form-urlencoded 发送.我试过这样:

Im using postman to execute requests. I found on the internet to send array via form-data or raw. But I need them to be send as x-www-form-urlencoded. I tried it this way:

但它是错误的,因为价值广告是字符串而不是数组.

But its wrong because value ads is string not array.

推荐答案

即使我找到了类似的解决方案,我也无法通过 x-www-form-urlencoded 解决它ads[].id,ads[0].id,ads.id,...它不起作用.所以我不得不把它写成原始的.并在标题部分以这种方式更改它.

I wasnt able to solve it via x-www-form-urlencoded even I found solutions like ads[].id, ads[0].id, ads.id,... It wasnt working. So I had to write it as raw. and in headers section change it this way.

身体是:

{ "deleted": "false",
  "ads": 
  [
    {
      "id": 15
    },
    {
      "id": 20
    }
  ]
}