Skip to main content

platform_http_client_builder

Function platform_http_client_builder 

Source
pub fn platform_http_client_builder() -> ClientBuilder
Expand description

Build a reqwest client builder with the TLS roots appropriate for the current platform.

Android command-line programs such as Termux do not run inside a Java application and therefore cannot initialize reqwest’s Android platform verifier with a JavaVM and Context. Use the Mozilla WebPKI roots there so native CLI/TUI HTTPS works without a JNI host. Other platforms keep reqwest’s platform verifier.