Skip to content

0.49.0

Choose a tag to compare

@peterver peterver released this 11 Jul 10:34
· 69 commits to main since this release

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.resHeaders readonly getter, which allows you to introspect the current set of outbound headers
  • feat: Added ctx.delHeaders allowing 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.render now 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 ❄️.