diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-03-09 22:02:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-09 22:02:01 -0500 |
| commit | 7c9ed45ac2fd580bbbb4b950ac350dd49fc7600e (patch) | |
| tree | 027efed5e8b03a30b4b7a23e86ad5ca2bd0d75e5 /lib/std/http.zig | |
| parent | 14590e956e06903ac408af57874d3b5a0d697670 (diff) | |
| parent | 524e0cd987a52a60ce1014aa27cd73f99a3b9958 (diff) | |
| download | zig-7c9ed45ac2fd580bbbb4b950ac350dd49fc7600e.tar.gz zig-7c9ed45ac2fd580bbbb4b950ac350dd49fc7600e.zip | |
Merge pull request #14762 from truemedian/http-keepalive
std.http: add connection pooling, handle keep-alive and compressed content
Diffstat (limited to 'lib/std/http.zig')
| -rw-r--r-- | lib/std/http.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/std/http.zig b/lib/std/http.zig index 7c2a2da605..ef89f09925 100644 --- a/lib/std/http.zig +++ b/lib/std/http.zig @@ -248,9 +248,24 @@ pub const Status = enum(u10) { pub const TransferEncoding = enum { chunked, + // compression is intentionally omitted here, as std.http.Client stores it as content-encoding +}; + +pub const ContentEncoding = enum { compress, deflate, gzip, + zstd, +}; + +pub const Connection = enum { + keep_alive, + close, +}; + +pub const CustomHeader = struct { + name: []const u8, + value: []const u8, }; const std = @import("std.zig"); |
