CLIでHTTPS(やHTTP)で通信したいときはcurlやwgetをよく使う。
$ curl https://127.0.0.1/index.html
$ wget https://127.0.0.1/download/hoge.zip
今回はちょっとCLIでSPDYを使ってデバッグしたいことがあったんだけど、手元のcurlやwgetだとまだサポートされてないようなので、CLIでSPDYを使って通信できるツールを探して使ってみた。(最新のcurlなら--http2というオプションがあるので使えるかもしれない)
spdylay
今回はspdylayというのを使ってみた。とりあえずビルド。
$ git clone https://github.com/tatsuhiro-t/spdylay
$ autoreconf -i
$ automake
$ autoconf
$ ./configure
$ make
srcディレクトリにspdycat
というバイナリができるのでこれを使う。
$ cd src
$ ./spdycat --spdy3-1 https://127.0.0.1/
これでCLIでもSPDYで通信できるようになった。