LoginSignup
23

More than 1 year has passed since last update.

posted at

updated at

curlでunix domain socket経由アクセスする

本当に毎回毎回毎回書式を忘れてググるので自分用にメモしておく
(manにもきちんと書いてないし…)

フォーマット

curl --unix-socket <ソケットへのパス> http:<URLパス>

curl --unix-socket /var/run/app.sock http://localhost/
curl --unix-socket /var/run/app.sock http://localhost/hoge.json

こんな感じでcurlでも Unix Domain Socket 経由でアクセスできる。
ただし、curlバージョン7.40以上である必要があります。

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
What you can do with signing up
23