Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 28 May 07:25
· 8 commits to main since this release

Added

  • RequestBuilder::disable_validation (feature schema-validate) — per-request skip of registry JSON Schema validation (request body, query, params, and response on send() or StreamingResponse::collect()). Matches TypeScript disableValidation. Strict ensure_route is unchanged. Garde (validate feature) is separate — use validate_response(false) on send_json_validated. Also on EndpointRequestBuilder.
  • ClientBuilder::wire_concurrency_limit — declare the Tower ConcurrencyLimitLayer limit so build() can warn when it matches max_in_flight.
  • Concurrency build warningstracing::warn! when max_in_flight is combined with a custom transport stack (backend, http_service, transport_stack, etc.), with a sharper message when client and wire limits are equal.
  • Cargo feature sseSseDecoder, parse_sse_events, StreamingResponse::sse_events / read_sse_events (included in full). Core streaming (send_stream, collect, etc.) is unchanged without this feature.
  • Edge-case integration tests — non-replayable upload streams on retry; throw_on_error with large streaming bodies (peek vs drain / BodyTooLarge); plugin init vs hook order; path/query URL regressions; Tower buffered vs streaming transport_stack; cancellation mid-collect() and during retry. See testing — edge-case matrix.

Changed

  • Breaking: SSE helpers are no longer built by default. Enable features = ["sse"] if you use .sse_events(), .read_sse_events(), or better_fetch::sse::* (they were always available in 0.5.0 without a separate feature flag).
  • request_pipeline — internal refactor only: shared stream body wrapping, peek limit helper, and transport-error handling in the HTTP loop (no public API change).

Migration (0.5.x → 0.6.0)

# Default features unchanged; add "sse" if you use SSE helpers.
better-fetch = { version = "0.6", features = ["json", "sse"] }

# Optional: declare Tower wire limit for build-time concurrency diagnostics.
# .wire_concurrency_limit(32)  # when using ConcurrencyLimitLayer::new(32) on transport_stack

If you use strict JSON Schema validation and need to skip it for one call (e.g. debugging or gradual rollout), use .disable_validation(true) on that request instead of turning off strict mode on the whole registry.