32
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Postman】Getメソッドで配列を渡す時にどう書くか

Last updated at Posted at 2019-07-15

経緯

Postmanを使うとき、
Postする際は配列をそのままJSONで渡すだけでいいが、
Getの場合は配列をどう渡せばいいのかよくわからない。

方法

hoge: [10, 3] を渡す場合

  • KEYに hoge[] と書く
  • valueに配列内の要素を書く
  • 上記を配列内の要素数分繰り返す

画像

postman

連想配列

hoge: { piyo: [10, 3]} を渡す場合下記のようになる

KEY VALUE
hoge[piyo][] 10
hoge[piyo][] 3

参考

RailsでGETメソッドのクエリストリングで配列を渡したい時にどうするか

32
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
32
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?