0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

curlコマンドのメモ

Posted at

curlコマンドを使う中で自分が気になったことをメモ。

ローカルサーバーに対してリクエストを投げるとエラーになる。

proxy環境下でブラウザからHTTPリクエストすると正常に通るのに、curlコマンドで実行するとエラーが発生する。
ブラウザではproxy設定をしているのでリクエストが通る。でもcurlコマンドのためだけにproxy関係の設定を変えるのは面倒。

--noproxyオプションを使い、proxyを使わずにリクエストする

# --noproxy [ドメイン] を指定。
curl http://localhost:8080/books --noproxy localhost
0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?