Function curl::init

source ·
pub fn init()
Expand description

Initializes the underlying libcurl library.

The underlying libcurl library must be initialized before use, and must be done so on the main thread before any other threads are created by the program. This crate will do this for you automatically in the following scenarios:

  • Creating a new Easy or Multi handle
  • At program startup on Windows, macOS, Linux, Android, or FreeBSD systems

This should be sufficient for most applications and scenarios, but in any other case, it is strongly recommended that you call this function manually as soon as your program starts.

Calling this function more than once is harmless and has no effect.