Skip to content

v0.51.0 — response header helpers + principles

Choose a tag to compare

@tshafer tshafer released this 11 Jul 16:28
· 106 commits to main since this release

Closes out the two Fastify references checked — Reply and Principles.

Reply parity. The response accessor was already comprehensive (json/text/html/redirect/send/status/header/type/append/removeHeader/cookie/clearCookie/abort…). This adds the three it lacked versus Fastify’s Reply:

  • response.headers({...}) — set several headers at once.
  • response.getHeader(name) / response.hasHeader(name) — read what has been set, so middleware (after await next()) can inspect a handler’s headers and set defaults (e.g. a fallback cache-control).

Principles. Fastify’s Principles page is a design-philosophy doc, not a capability — so Keel now states its own, in docs/architecture.md#design-principles: container-first, convention-over-configuration, thin-over-clever, wrap-the-best/own-the-surface, and (newly spelled out) edge-safe & driver-agnostic and explicit-over-implicit.

325 tests; type-checked doc examples. See docs/request-response.md.