neto
neto is a Rust crate providing a flexible HTTP client abstraction with a focus on builder patterns, header management, and easy configuration of reqwest::Client. It supports both manual client injection and automatic client configuration with default headers.
โจ Features
- ๐๏ธ Fluent builder API for
Httpclient with support for base URL, headers, and client. - โ๏ธ Automatic creation of
reqwest::Clientwith default headers via.config(). - ๐ Easy injection of authorization tokens and other headers.
- ๐ Support for both manual
Clientpassing and automatic client configuration. - ๐ Async HTTP request helpers using
reqwest. - ๐งช Comprehensive testing with real API calls (e.g., PokeAPI).
โ๏ธ Installation
Add it to your Cargo.toml:
๐ Usage
Manual Client injection
Create an Http instance by passing a manually created reqwest::Client. Headers are stored but not applied automatically to the client.
use Http;
use ;
async
Automatic client creation with .config()
Build the Http struct without passing a client, then call .config() to create the reqwest::Client internally with all headers applied as default headers.
use Http;
use ;
async