45
37

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でデータを標準入力から受け取ってPOSTする

Posted at

curlでは

$ curl http://hoge.com -X POST -d 'a=1&c=2'

などとしてPOSTでデータを送ることができますが, -dオプションに@-を渡せば受け取った標準入力をデータとしてcurlを撃てます.

$ なんかの処理 | curl http://hoge.com -X POST -d @-

夢が広がります.

45
37
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
45
37

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?