Skip to main content

Crate aws_smithy_http_client_reqwest

Crate aws_smithy_http_client_reqwest 

Source
Expand description

reqwest-backed HTTP client integration for Smithy runtimes.

This crate provides ReqwestHttpClient, an implementation of aws_smithy_runtime_api::client::http::HttpClient backed by reqwest::Client.

It is useful when you want to reuse an existing reqwest client configuration such as custom headers, proxies, TLS settings, or connection pools with Smithy-based clients.

This helps remove dependencies such as rustls and aws-lc-rs that are forced onto the AWS SDK; you will need to build these yourself via reqwest.

§Examples

use aws_config::BehaviorVersion;
use aws_smithy_http_client_reqwest::ReqwestHttpClient;

let reqwest_client = reqwest::Client::builder()
    .user_agent("my-app/1.0")
    .build()?;

let config = aws_config::defaults(BehaviorVersion::latest())
  .http_client(ReqwestHttpClient::new(reqwest_client))
  .load();

§Limitations

  1. Connect timeout is not supported

Structs§

ReqwestHttpClient
A Smithy HttpClient implementation backed by reqwest::Client.