pub fn default_reqwest_settings() -> ClientBuilder
Expand description

Returns a reqwest client builder with default settings.

Client built from default settings is supposed to work over long time durations, see the issue 223.

The current settings are:

  • A connection timeout of 5 seconds.
  • A timeout of 17 seconds.
  • tcp_nodelay is on.

Notes

  1. The settings may change in the future.
  2. If you are using the polling mechanism to get updates, the timeout configured in the client should be bigger than the polling timeout.
  3. If you alter the current settings listed above, your bot will not be guaranteed to work over long time durations.