15
9

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でタイムアウトを設定する方法

Last updated at Posted at 2018-12-27

タイムアウトを2秒に設定する場合

command.sh
curl -m 2 -o output https://example.com

デフォルトは300秒(300000ミリ秒)です。

ソース:
#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
https://github.com/curl/curl/blob/master/lib/connect.h

15
9
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
15
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?