1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//! Adapt a [`fetch::HttpClient`] into an Azure SDK HTTP transport.
//!
//! The Azure SDK abstracts its HTTP transport behind the
//! [`azure_core::http::HttpClient`] trait. [`HttpClient`] implements it on top
//! of a `fetch` client, so Azure SDK pipelines run over `fetch` and benefit
//! from its resilience and observability.
//!
//! To run the Azure SDK on an `anyspawn`-backed async runtime, see the
//! `anyspawn_azure` crate.
//!
//! # Example
//!
//! ```
//! use azure_core::http::{ClientOptions, Transport};
//! use fetch_azure::HttpClient;
//!
//! # fn example(client: fetch::HttpClient) {
//! // Wire a `fetch` client in as the transport for an Azure SDK client.
//! let transport = Transport::new(HttpClient::from(client).into());
//! let options = ClientOptions {
//! transport: Some(transport),
//! ..Default::default()
//! };
//! # let _ = options;
//! # }
//! ```
pub use HttpClient;