curlコマンドの使い方
RESTAPIなどでHTTP関連のリクエストを手軽に扱えるcurlコマンドの使い方です。
ユーザ名・パスワードの指定
"-u ユーザ名:パスワード" で指定を行います。
# curl -u "username":"password" http://IPaddr:Port/pass
ファイルの指定
カレントディレクトリのファイルを指定する場合は、"-d @ファイル名"という使い方です。test.xmlというファイル名の場合は以下のようになります。
# curl -v -X PUT -H "Content-type: application/xml" http://IPaddr:Port/pass -d @test.xml