karlseguin / http.zig

An HTTP/1.1 server for zig
MIT License
533 stars 41 forks source link

Expose `key_value` in root module #45

Closed bobf closed 4 months ago

bobf commented 4 months ago

I have an abstraction layer that wraps http.zig headers, currently I'm doing this:

const HttpzKeyValue = std.meta.fieldInfo(httpz.Request, std.meta.FieldEnum(httpz.Request).headers).type;

const MyHeaders = struct {
    httpz_headers: *HttpzKeyValue,
    // ...
};

If I'm missing something obvious that makes this PR unneeded please feel free to share.