ローカル参照と公開済みの全モードを含む完全パッケージをインストールします。
install curlcurlリモートエンドポイントがサーバー側からどう見えるか確認したいときに
curl <url|host|me> [options]curl me現在のホストを使用する
curl example.comGET リクエストを送信して状態と本文を表示する
curl example.com -I最終レスポンスヘッダーだけを表示する
curl example.com -s [file]レスポンスを保存する; 省略時は URL のファイル名を使用する
curl example.com -X POST -d "a=1"リクエスト本文を送信する
-X <method>HTTP メソッドを設定する
-d <data>リクエスト本文を設定する; 既定は POST
-H "Name: value"リクエストヘッダーを追加する; 複数回指定可能
-u <user>非表示のパスワード入力で HTTP Basic 認証を使用する
-c '{"name":"value"}'JSON オブジェクトから cookie を送信する
-s [file] | -o <file>ホスト上にレスポンスを保存する
-a置換せず追記する; -s または -o が必要
-i最終レスポンスヘッダーを含める
-I最終レスポンスヘッダーだけを表示する
-jレスポンスを構造化 JSON で表示する
-edit @editレスポンス本文をテキストエディターで開く
-code @codeレスポンス本文をコードエディターで開く
-t [seconds]5 秒または 1 から 300 秒の任意のタイムアウトを使用する
-T300 秒のタイムアウトを使用する
-4 | -6-rリダイレクトを追跡しない
-k安全でない TLS 証明書を許可する
用意された例をページ上でそのまま実行できます。結果は事前に生成されてブラウザに表示され、サーバーではターミナルコマンドを実行しません。
現在の互換バージョンをインストールします。全機能は Base、縮小版は Minimum を選び、すでに導入済みのモジュール更新には upgrade を使います。
Base と Minimum は同じ現在のモジュールリリースの二つのパッケージです。
ローカル参照と公開済みの全モードを含む完全パッケージをインストールします。
install curl縮小パッケージをインストールします。ローカルリファレンスは含まれず、
install curl -mこの公開済みバージョンを正確に指定してインストールします。
install curl -v 1.2.4upgrade が互換性を確認し、必要な場合だけブロックを置換します。
upgrade curlコアや他のモジュールに触れず拡張ブロックを削除します。
install curl -u例はコピーできますが、サイトは実行しません。実プロジェクトではパス、権限、破壊的オプションを確認してください。
curl https://example.com -I | curl https://example.com/feed.xml -o sandbox/tmp/feed-copy.xmlHTTP/2 200
content-type: text/html; charset=UTF-8
content-length: 1256
sandbox/tmp/
feed-copy.xmlcurl https://example.comHTTP 200
URL https://example.com/
<!doctype html>
<html>
<head><title>Example Domain</title></head>
<body>…</body>
</html>curl https://example.com -IHTTP/2 200
content-type: text/html; charset=UTF-8
cache-control: max-age=86000
content-length: 1256curl https://example.com -iHTTP/2 200
content-type: text/html; charset=UTF-8
<!doctype html>
<html>…</html>curl https://example.com/api -H "Accept: application/json"HTTP 200
URL https://example.com/api
{"status":"ok","service":"example"}curl https://example.com/api -X POST -d "name=lil"HTTP 200
URL https://example.com/api
{"saved":true,"name":"lil"}curl https://example.com -c '{"theme":"dark"}'HTTP 200
URL https://example.com/
<!doctype html>
<html data-theme="dark">…</html>curl https://example.com/feed.xml -o sandbox/tmp/feed.xmlsandbox/tmp/
feed.xmlcurl meHTTP 200
URL https://lil.dog/
<!doctype html>
<html>…</html>curl https://example.com -6HTTP 200
URL https://example.com/
<!doctype html>
<html>…</html>curl https://example.com -rHTTP 200
URL https://example.com/
<!doctype html>
<html>…</html>curl https://example.com -4HTTP/2 200
content-type: application/json
content-length: 128curl ftp://example.comURL: 無効