macro_rules! http_get {
    ($url: expr, $headers: expr) => { ... };
    ($url: expr) => { ... };
}
Expand description

Make a simple HTTP GET request

Arguments

url: The URL to GET headers: The headers to send with the request

Examples

use pink_extension::http_get;
let response = http_get!("https://example.com/");
assert_eq!(response.status_code, 200);
use pink_extension::http_get;
let headers = vec![("X-Foo".into(), "Bar".into())];
let response = http_get!("https://example.com/", headers);
assert_eq!(response.status_code, 200);