From 509cbdab9dbecd549f0d933e680be4a8b85d392b Mon Sep 17 00:00:00 2001 From: Fredrik Enestad Date: Mon, 9 Dec 2024 14:48:53 +0100 Subject: [PATCH] docs: fix outdated info and typo in middleware docs --- docs/ts/develop/middleware.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ts/develop/middleware.md b/docs/ts/develop/middleware.md index 0a0c49c20b..64ba8613a4 100644 --- a/docs/ts/develop/middleware.md +++ b/docs/ts/develop/middleware.md @@ -66,8 +66,8 @@ For [Raw Endpoints](/docs/ts/primitives/raw-endpoints) you can access the raw re raw response via `req.rawRequest` and `req.rawResponse`. The `next` function returns a `HandlerResponse` object which contains the response from the API. -Extra response headers can be added using `req.setHeader(key, value)`, if the endpoint is -a [typed API endpoint](/docs/ts/primitives/defining-apis). +Extra response headers can be added using `resp.header.set(key, value)` or `resp.header.add(key, value)`, +if the endpoint is a [typed API endpoint](/docs/ts/primitives/defining-apis). ## Middleware ordering