0.1.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
0.1.0 - 2026-05-27
Added
better-fetch— typed HTTP client on top of reqwest withClient,ClientBuilder, and fluentRequestBuilder.- JSON request/response via serde (
json,send_json,json_unchecked, optional customjson_parser). - Dynamic path parameters (
:id), query strings (including repeated keys andquery_json), and@put/...method path modifiers. - Absolute URL paths that bypass
base_urlwhen the path is a fullhttp(s)://URL. - Authentication: Bearer, Basic, and custom prefix; static, sync, and async token sources.
- Retry policies:
count, linear, and exponential backoff with customshould_retryand default retry on 429/502/503/504. - Lifecycle hooks:
on_request,on_response,on_success,on_error,on_retry;retry_attempton request context. - Plugin system with
initand merged hooks; built-inLoggerPluginusingtracing. Endpointtrait andclient.call::<E>()for typed routes.HttpBackendabstraction with reqwest implementation andClientBuilder::backendfor mocks.- Error type with HTTP status,
status_text, response body bytes, andapi_json()for API error payloads. - Optional features:
schema/openapi(registry + minimal OpenAPI builder),tower/tower-http(transportServicestack),validate(garde response validation),macros(reserved proc-macro crate). typed-fetchandapi-fetch— crates.io aliases that re-exportbetter-fetch.better-fetch-tower— optional companion crate for Tower transport integration.better-fetch-macros— placeholder proc-macro crate for future derives.- Workspace examples (
basic,typed_endpoint,hooks,logger_plugin,retry,auth,validated_response,tower_stack). - Integration and unit tests (60+ cases) with wiremock.
Notes
- Inspired by @better-fetch/fetch; independent Rust implementation, not affiliated with the upstream TypeScript project.