Changelog¶
All notable changes to relay are documented in this file.
The format follows Keep a Changelog. relay uses Semantic Versioning.
[0.4.0] - 2026-04-27¶
Added¶
- Automatic Session Management (
config.go) - All relay clients now initialize with a defaulthttp.CookieJarviacookiejar.New(nil)indefaultConfig(). This enables transparent cookie persistence across requests, fixing a critical issue where CSRF token + cookie pairs required by SAP and other enterprise backends were being silently discarded.
Changed¶
- CSRF Token Reliability - The automatic
CookieJarsupport fixes the root cause of403 CSRF token validation failederrors in enterprise integrations. SAP OData services require CSRF tokens to be paired atomically with session cookies—separating them breaks token validation. With BUG-001 fixed,http.Clientnow automatically: - Captures
Set-Cookieheaders from token fetch responses - Includes captured cookies in subsequent POST/PUT/PATCH requests
- Manages cookie storage and expiration transparently
- Eliminates the need for manual cookie management in application code
Notes for Upgrade¶
- 100% backward compatible - Existing code requires no changes
- Custom CookieJar - Users can still provide custom
CookieJarimplementations via theWithCookieJar()option - No new dependencies - Uses Go's standard library
net/http/cookiejar
[0.3.0] - Phase G: Protocol Extensions¶
Added¶
- WebSocket support (
websocket.go) - full-duplex connections with typed message handlers, ping/pong keepalive, and automatic reconnection - Dynamic TLS watcher (
tls_watcher.go) - hot-reload TLS certificates from disk without restarting the client; watches for file changes and rotates credentials transparently - Transport adapters (
transport_adapters.go) - plug in customhttp.RoundTripperimplementations; includes built-in adapters for Unix socket, in-memory, and custom dial functions - HTTP/3 QUIC extension (
ext/http3/) - QUIC transport viaquic-go; automatic fallback to HTTP/2 when QUIC is unavailable
[0.2.0] - Phase F: Resilience & Advanced Features¶
Added¶
- Bulkhead isolation - per-endpoint concurrency limits using semaphores to prevent one slow upstream from consuming all goroutines
- Request hedging (
hedging.go) - send a duplicate request after a configurable delay; the fastest response wins, improving tail latency - Content negotiation - automatic
AcceptandContent-Typeheader management with codec registration (JSON, CBOR, MessagePack, XML) - Timeout tiers (
config.go) - separate dial, TLS handshake, response header, and total request timeouts - Typed pagination (
pagination.go) - genericPaginator[T]that followsLink, cursor, offset, or custom next-page strategies - Circuit breaker - token-bucket state machine that opens after N failures and probes recovery after a configurable timeout
- DNS cache - in-process DNS resolution cache with configurable TTL to reduce DNS lookup latency
[0.1.0] - Phase E: Developer Experience & Foundations¶
Added¶
- Semantic hooks - typed lifecycle hooks:
OnRequest,OnResponse,OnError,OnRetry - Idempotency keys (
idempotency.go) - automaticIdempotency-Keyheader injection with configurable generators - Response classification (
classification.go) - categorise responses into success, client error, server error, redirect with structured error types - Generic decode helpers (
generics.go) -relay.Decode[T]()andrelay.DecodeSlice[T]()for zero-boilerplate typed response parsing - Redirect chain (
response.go) -Response.RedirectChain()exposes the full list of intermediate URLs followed during a redirect
[0.0.1] - Initial release¶
Added¶
- Declarative request builder with method chaining
- Automatic JSON marshal/unmarshal for request bodies and responses
- Configurable retry with exponential backoff, jitter, and per-status-code policies
BaseURL+ path composition- Context propagation and cancellation support
- Structured error types with status code and body access
- Default headers and query parameters
- Basic authentication and Bearer token helpers
http.RoundTrippertransport slot for full customisation