Skip to main content

Crate fetch_azure

Crate fetch_azure 

Source
Expand description

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;

// 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()
};

Structs§

HttpClient
An azure_core::http::HttpClient implementation backed by a fetch::HttpClient transport.