From 9dcb09a6a89e6f12d7582ab13b729424fbbd0dc7 Mon Sep 17 00:00:00 2001 From: Xavier Haniquaut <1308790+xavhan@users.noreply.github.com> Date: Wed, 9 Feb 2022 16:02:53 +0100 Subject: [PATCH] docs(api-routes): fix node docs links (#34125) ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` --- docs/api-routes/introduction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-routes/introduction.md b/docs/api-routes/introduction.md index 4274f7d0f7b2..3177caa5a68b 100644 --- a/docs/api-routes/introduction.md +++ b/docs/api-routes/introduction.md @@ -29,8 +29,8 @@ export default function handler(req, res) { For an API route to work, you need to export a function as default (a.k.a **request handler**), which then receives the following parameters: -- `req`: An instance of [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage), plus some [pre-built middlewares](/docs/api-routes/api-middlewares.md) -- `res`: An instance of [http.ServerResponse](https://nodejs.org/api/http.html#http_class_http_serverresponse), plus some [helper functions](/docs/api-routes/response-helpers.md) +- `req`: An instance of [http.IncomingMessage](https://nodejs.org/api/http.html#class-httpincomingmessage), plus some [pre-built middlewares](/docs/api-routes/api-middlewares.md) +- `res`: An instance of [http.ServerResponse](https://nodejs.org/api/http.html#class-httpserverresponse), plus some [helper functions](/docs/api-routes/response-helpers.md) To handle different HTTP methods in an API route, you can use `req.method` in your request handler, like so: