8 releases

0.3.2 Mar 12, 2023
0.3.1 Mar 12, 2023
0.2.0 Mar 2, 2023
0.1.3 Dec 1, 2022
0.1.1 Mar 16, 2022

#325 in HTTP client

Download history 78/week @ 2024-08-12 105/week @ 2024-08-19 107/week @ 2024-08-26 74/week @ 2024-09-02 114/week @ 2024-09-09 277/week @ 2024-09-16 313/week @ 2024-09-23 135/week @ 2024-09-30 121/week @ 2024-10-07 99/week @ 2024-10-14 100/week @ 2024-10-21 118/week @ 2024-10-28 174/week @ 2024-11-04 73/week @ 2024-11-11 193/week @ 2024-11-18 119/week @ 2024-11-25

567 downloads per month

MPL-2.0 license

34KB
537 lines

system_proxy.rs

Current release Documentation

Resolve system HTTP(S) proxies for URLs.

let proxy = system_proxy::default();
let client = reqwest::blocking::Client::builder()
    .user_agent(concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")))
    .proxy(reqwest::Proxy::custom(move |u| proxy.for_url(u)))
    .build()
    .unwrap();

let response = client.get("https://httpbin.org/status/200").send().unwrap();
println!("Status code: {}", response.status());

See the module level documentation for more information.

License

Copyright 2022 Sebastian Wiesner sebastian@swsnr.de

This Source Code is subject to the terms of the Mozilla Public License, v. 2.0. See LICENSE or https://mozilla.org/MPL/2.0/ for a copy of the license.

Dependencies

~2–16MB
~219K SLoC