Signing API requests without effort.
Most API is simple. But they could be complicated when they are hidden from complex abstraction. reqsign
bring the simple API back: build, sign, send.
```rust use reqsign::services::aws::v4::Signer; use reqwest::{Client, Request, Url}; use anyhow::Result;
async fn main() -> Result<()>{ // Signer will load region and credentials from environment by default. let signer = Signer::builder().service("s3").build().await?; // Construct request let url = Url::parse( "https://s3.amazonaws.com/testbucket")?; let mut req = reqwest::Request::new(http::Method::GET, url); // Signing request with Signer signer.sign(&mut req).await?; // Sending already signed request. let resp = Client::new().execute(req).await?; println!("resp got status: {}", resp.status()); Ok(()) } ```
reqsign::services::aws::v4::Signer
reqsign::services::azure::storage::Signer
Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.
Submit issues for bug report or asking questions in discussion.
Inspired a lot from:
Licensed under Apache License, Version 2.0.