Skip to content

0.1.0

Choose a tag to compare

@salasebas salasebas released this 27 May 07:54
· 42 commits to main since this release

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 with Client, ClientBuilder, and fluent RequestBuilder.
  • JSON request/response via serde (json, send_json, json_unchecked, optional custom json_parser).
  • Dynamic path parameters (:id), query strings (including repeated keys and query_json), and @put/... method path modifiers.
  • Absolute URL paths that bypass base_url when the path is a full http(s):// URL.
  • Authentication: Bearer, Basic, and custom prefix; static, sync, and async token sources.
  • Retry policies: count, linear, and exponential backoff with custom should_retry and default retry on 429/502/503/504.
  • Lifecycle hooks: on_request, on_response, on_success, on_error, on_retry; retry_attempt on request context.
  • Plugin system with init and merged hooks; built-in LoggerPlugin using tracing.
  • Endpoint trait and client.call::<E>() for typed routes.
  • HttpBackend abstraction with reqwest implementation and ClientBuilder::backend for mocks.
  • Error type with HTTP status, status_text, response body bytes, and api_json() for API error payloads.
  • Optional features: schema / openapi (registry + minimal OpenAPI builder), tower / tower-http (transport Service stack), validate (garde response validation), macros (reserved proc-macro crate).
  • typed-fetch and api-fetch — crates.io aliases that re-export better-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.