How to post array values via curl?

后端 未结 1 1521
春和景丽
春和景丽 2020-12-31 07:03

I like to test an API backend which is designed as shown in the following example:

http://localhost:3000/api/v1/shops/1.json

The JSON respo

相关标签:
1条回答
  • 2020-12-31 07:38
    $ curl -X POST http://localhost:3000/api/v1/shops.json -d \
      "shop[name]=Supermarket \
      &shop[products][]=fruit \
      &shop[products][]=eggs \
      &auth_token=a1b2c3d4"
    
    0 讨论(0)
提交回复
热议问题