fetch 0.13.0

HTTP client with resilience, observability, and Tokio runtime support.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Demonstrates basic usage of the HTTP client on the Tokio runtime.

use fetch::HttpClient;

#[tokio::main]
async fn main() -> Result<(), ohno::AppError> {
    let client = HttpClient::new_tokio();

    let response = client.get("https://example.com").fetch().await?;
    println!("Request completed with status: {}", response.status());

    Ok(())
}