Repository navigation
0.49.0
This update introduces a round of context ergonomics and spec-aligned header behavior improvements, ensuring TriFrost is even more predictable and introspectable at runtime.
Added
- feat: Added
ctx.resHeadersreadonly getter, which allows you to introspect the current set of outbound headers - feat: Added
ctx.delHeadersallowing you to remove multiple outbound headers at once by passing an array of strings
ctx.setHeader('x-foo', 'bar');
ctx.setHeader('x-bar', 'baz');
ctx.setHeader('x-baz', 'qux');
ctx.delHeaders(['x-foo', 'x-baz']);
ctx.resHeaders; /* {'x-bar': 'baz'} */Improved
- qol:
ctx.rendernow merges the passed options on top of the defaults - qol: Inbound and outbound headers will now be treated as case insensitive and be lowercased (as per RFC 7230 and RFC 9110)
These changes help bring TriFrost's context handling in line with HTTP spec expectations while improving DX for response construction and rendering.
As always, stay frosty ❄️.