LoginSignup
406
394

More than 5 years have passed since last update.

curlを捨ててhttpieを使おう

Last updated at Posted at 2012-12-26

curl(see urlと発音するらしい本家のFAQによると開発陣は kurl と発音してるらしいです)はプログラムから使うには便利だけど、オプションがわかりにくい。

httpieはより直感的なcurl代替コマンド。よほどcurlに思い入れがない限りhttpieをおすすめする。

インストール

easy_install httpie
# OR
pip install -U httpie

使用例

httpie

奥がcurlで、手前がhttpieを使った場合。見れば分かるようにhttpieは自動で色付けをしてくれるし、コマンドもかなり直感的だ。内部的にはPythonのrequestsというモジュールを使っている。Python組み込みのHTTPクライアントに辟易している人はそちらも調べてみるととても幸せになれる。

406
394
6

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
406
394