Skip to content

Commit 4108505

Browse files
Update CHANGELOG.md
1 parent 6369c5d commit 4108505

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## 1.1.0 — 2026-04-13
2+
3+
### Added
4+
5+
**SSE (Server-Sent Events)**
6+
7+
- `hurl.sse(url, options)` — fetch-based SSE client that works where native `EventSource` cannot: supports POST requests, custom headers, Bearer/Basic/API key auth, `baseUrl`, and query params
8+
- Parses the full `text/event-stream` wire format — `data`, `event`, `id`, and `retry` fields
9+
- Handles the `data: [DONE]` sentinel used by OpenAI, Anthropic, and other AI APIs — fires `onDone` and closes cleanly
10+
- Returns `{ close() }` synchronously so you can cancel the stream at any time
11+
- Respects an external `AbortSignal` passed via `options.signal`
12+
- `SSEOptions` and `SSEEvent` types are exported
13+
14+
**Circuit Breaker**
15+
16+
- `circuitBreaker` option on both per-request options and instance defaults
17+
- Three-state machine: CLOSED → OPEN → HALF_OPEN → CLOSED
18+
- `threshold` — number of consecutive failures before the circuit opens
19+
- `cooldown` — how long (ms) to wait before allowing a probe request through
20+
- `key` — optional custom key for the breaker; defaults to the URL origin so all requests to the same host share one breaker
21+
- `fallback` — optional function that returns a value to use when the circuit is open instead of throwing
22+
- When the circuit is open and no fallback is set, throws a `HurlError` with type `CIRCUIT_OPEN`
23+
- Aborted requests and circuit-open errors do not count as failures
24+
- `getCircuitStats(key)` exported from the main entry point for observability
25+
- `CIRCUIT_OPEN` added to the `HurlErrorType` union
26+
27+
28+
---
29+
130
## 1.0.7 — 2026-03-07
231

332
### Fixed
@@ -27,8 +56,6 @@
2756
### Contributors
2857
- HeavstalTech: signal fix, cache hardening, test suite
2958

30-
31-
3259
## 1.0.4
3360

3461
- Fixed stream buffering — response body no longer loaded into memory when `stream: true`, body is returned as raw `ReadableStream` for the caller to pipe directly to disk

0 commit comments

Comments
 (0)