Windows で curl コマンドを使う

2018年7月26日木曜日

curl windows

t f B! P L

Windows で curl コマンドを使う

windows 10 (64bit)環境で curl コマンドを使えるようにします。

1. curl コマンドのダウンロード

以下のサイトから curl コマンドをダウンロードします
https://curl.haxx.se/download.html

トップページの Downloadリンクをクリック
enter image description here

下の方までスクロールすと、Win64環境用の Download リンクがあります。
今回は「Win64 ia64 CAB」をダウンロードします。

enter image description here

2. Windowsのシステムフォルダに、curlコマンドをコピー

ダウンロードした curlコマンドの cabファイルを「C:\Windows\System32」にコピーします。

enter image description here

3. curl コマンドを使う

コマンドプロンプトを立ち上げて、curl -help と入力します。
ヘルプの内容が表示されればインストール成功です。

C:\>curl -help
Usage: curl [options...] <url>
     --abstract-unix-socket <path> Connect via abstract Unix domain socket
     --anyauth       Pick any authentication method
 -a, --append        Append to target file when uploading
     --basic         Use HTTP Basic Authentication
     --cacert <CA certificate> CA certificate to verify peer against
     --capath <dir>  CA directory to verify peer against
 -E, --cert <certificate[:password]> Client certificate file and password
     --cert-status   Verify the status of the server certificate
     --cert-type <type> Certificate file type (DER/PEM/ENG)
     --ciphers <list of ciphers> SSL ciphers to use
     --compressed    Request compressed response
 ・・・省略・・・

おわりに

IBM Cloud の AI関連のAPIなど、最近は curl コマンドでサンプルが書かれている事が多いので、Windowsでも curl コマンドを使えるようにしておくと便利ですね。

スポンサーリンク
スポンサーリンク

このブログを検索

Profile

自分の写真
Webアプリエンジニア。 日々新しい技術を追い求めてブログでアウトプットしています。
プロフィール画像は、猫村ゆゆこ様に書いてもらいました。

仕事募集もしていたり、していなかったり。

QooQ