covenix / ResponseBase
Abstract Class: ResponseBase
Defined in: src/response.ts:57
Base class for covenix's value-style responses — return one from a handler to describe the response declaratively (status, headers, cookies, …) instead of mutating the raw Express res. The concrete subclasses are HttpResponse (a JSON/validated body), and FileResponse / RangeFileResponse (binary bodies).
covenix detects these by instanceof, so returning one is always opt-in — a bare return value is sent (and validated) exactly as before.
Extended by
Constructors
Constructor
protectednew ResponseBase(options?):ResponseBase
Defined in: src/response.ts:65
Parameters
options?
ResponseBaseOptions = {}
Returns
ResponseBase
Properties
cookies
readonlycookies:ResponseCookie[] |undefined
Defined in: src/response.ts:63
Cookies to set (each its own Set-Cookie), if any.
headers
readonlyheaders:Record<string,HeaderValue> |undefined
Defined in: src/response.ts:61
Extra response headers, if set.
status
readonlystatus:number|undefined
Defined in: src/response.ts:59
Explicit HTTP status, if set.
