2
2

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 3 years have passed since last update.

postmanで連想配列を渡す方法

Posted at

postmanを使っているときに、連想配列を渡す方法に少し詰まった。

解決してしまえばシンプルなことだったが、自分用の備忘録として残しておく。

POSTメソッドで配列・連想配列を渡す方法

以下の画像の通り、 [Body] > [raw] > [JSON] を選んで、を選んで、配列や連想配列を渡せば良い。
スクリーンショット 2022-03-30 18.36.24.png

関連記事

ついでに、ググっていて以下の記事の内容も初めて知ったのでメモ。


PUT, DELETEメソッドの場合は、form-data の形式ではデータを渡せない。
確かに試してみると405(Method Not Allowed)のエラーとなった。


GETメソッドの場合は、POSTの場合にシンプルにJSON形式で書いたのとは異なり、KEY,VALUEを上手く使って書く必要があるらしい。

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?