You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-11Lines changed: 58 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,24 +32,25 @@ TurboHTTP replaces `HttpClient` with a reactive, backpressure-aware HTTP pipelin
32
32
### HTTP Features
33
33
34
34
-**Redirect following** — 301, 302, 303, 307, 308 with correct method rewriting (POST to GET on 303), body preservation on 307/308, loop detection, and HTTPS-to-HTTP downgrade protection. Configurable max redirects.
35
-
-**Cookie management** — automatic cookie storage and injection across requests. Supports domain/path matching, `Secure`, `HttpOnly`, `SameSite`, `Max-Age`, and `Expires`. Bring your own `CookieJar`or use the built-in one.
36
-
-**HTTP caching** — in-memory LRU cache with `Vary` support, conditional requests via `ETag`/`If-None-Match` and `Last-Modified`/`If-Modified-Since`, freshness evaluation (`max-age`, `s-maxage`, `Expires`, heuristic), and 304 response merging. Configurable via `CachePolicy`.
35
+
-**Cookie management** — automatic cookie storage and injection across requests. Supports domain/path matching, `Secure`, `HttpOnly`, `SameSite`, `Max-Age`, and `Expires`. Bring your own `ICookieJar` implementation or use the built-in `CookieJar`.
36
+
-**HTTP caching** — in-memory LRU cache with `Vary` support, conditional requests via `ETag`/`If-None-Match` and `Last-Modified`/`If-Modified-Since`, freshness evaluation (`max-age`, `s-maxage`, `Expires`, heuristic), and 304 response merging. Pluggable via `ICacheStore` for custom storage backends (Redis, disk, etc.).
37
37
-**Content encoding** — automatic gzip, deflate, and Brotli response decompression. Optional request body compression. Can be disabled per-client if you need raw compressed bytes.
38
38
-**100-Continue** — `Expect: 100-continue` handling for large request bodies.
39
39
40
40
### Performance
41
41
42
-
-**Zero-allocation internals** — `MemoryPool<byte>`, `Span<T>`, `ReadOnlyMemory<byte>`, `IBufferWriter<byte>`, and `System.Threading.Channels` throughout the hot path
42
+
-**Zero-allocation internals** — `MemoryPool<byte>`, `Span<T>`, `ReadOnlyMemory<byte>`, and `System.Threading.Channels` throughout the hot path
43
43
-**HTTP/2 multiplexing** — multiple concurrent requests over a single TCP connection with header compression and per-stream flow control
44
44
-**Backpressure** — Akka.Streams backpressure propagates end-to-end from the network to the caller, preventing buffer bloat and memory exhaustion under load
45
45
-**Channel-based API** — for high-throughput scenarios, bypass `SendAsync` and write/read directly to `System.Threading.Channels` for pipelined I/O
46
46
47
47
### Extensibility
48
48
49
49
-**Handler pipeline** — compose custom request/response transforms via `TurboHandler` subclasses or inline delegates, ordered FIFO
50
+
-**Pluggable storage** — bring your own `ICookieJar` for custom cookie persistence or `ICacheStore` for external cache backends (Redis, disk, etc.)
50
51
-**Distributed tracing** — built-in OpenTelemetry-compatible tracing via `TracingBidiStage` for request/response lifecycle visibility
51
52
-**DI integration** — first-class `IServiceCollection` support with named and typed clients, `IOptionsMonitor` for runtime configuration changes
52
-
-**4,200+ tests** — unit tests, stream stage tests, integration tests, and benchmarks
53
+
-**6,300+ tests** — unit tests, stream stage tests, acceptance tests, integration tests, API tests, and benchmarks
53
54
54
55
---
55
56
@@ -106,8 +107,8 @@ services
106
107
.WithRedirect()
107
108
.WithCookies()
108
109
.WithDecompression()
109
-
.WithRetry(newRetryPolicy { MaxRetries=3 })
110
-
.WithCache(newCachePolicy { MaxEntries=1000 });
110
+
.WithRetry(retry=>retry.MaxRetries=3)
111
+
.WithCache(cache=>cache.MaxEntries=1000);
111
112
```
112
113
113
114
Then inject and use:
@@ -152,6 +153,48 @@ await foreach (var response in client.Responses.ReadAllAsync())
152
153
}
153
154
```
154
155
156
+
### Custom Cookie Jar
157
+
158
+
Implement `ICookieJar` to plug in your own cookie storage (e.g. encrypted, persistent, or shared across clients):
0 commit comments