3
3

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.

curlで複数パラメータをGETで渡す

Posted at

macのターミナルからGETパラメータを複数渡すAPIを叩きたいが、うまくいかない。
-vオプションでリクエストを確認すると、パラメータを1つしか渡せていないよう。
&をエスケープする必要があった。


curl --globoff -v -H 'Authorization: Bearer [accessToken]' \
 http://example.com/search?params[key1]=value1\&params[key2]=value2

ちなみに、パラメータに[]を使う場合は、--globoffオプションをつける必要がある。

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?