Skip to content

Commit

Permalink
docs(functions): update links within function docs (#31816)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganesu authored Jun 8, 2021
1 parent 9b2c82c commit ea5f3f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/docs/reference/functions/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ export default function handler(req, res) {

A Function file must export a single function that takes two parameters:

- `req`: Node's [http request object](https://nodejs.org/api/http.html#http_class_http_incomingmessage) with some [automatically parsed data](/docs/how-to/functions/getting-started/#common-data-formats-are-automatically-parsed)
- `res`: Node's [http response object](https://nodejs.org/api/http.html#http_class_http_serverresponse) with some [extra helper functions](/docs/how-to/functions/middleware-and-helpers/#res-helpers)
- `req`: Node's [http request object](https://nodejs.org/api/http.html#http_class_http_incomingmessage) with some [automatically parsed data](/docs/reference/functions/getting-started/#common-data-formats-are-automatically-parsed)
- `res`: Node's [http response object](https://nodejs.org/api/http.html#http_class_http_serverresponse) with some [extra helper functions](/docs/reference/functions/middleware-and-helpers/#res-helpers)

Dynamic routing is supported for creating REST-ful APIs and other uses cases

- `/api/users` => `src/api/users/index.js`
- `/api/users/23` => `src/api/users/[id].js`

[Learn more about dynamic routes](/docs/how-to/functions/routing#dynamic-routing)
[Learn more about dynamic routes.](/docs/reference/functions/routing#dynamic-routing)

## Typescript

Expand All @@ -60,7 +60,7 @@ export default function handler(

Query strings and common body content types are automatically parsed and available at `req.query` and `req.body`

Read more about [supported data formats](/docs/how-to/functions/middleware-and-helpers).
Read more about [supported data formats](/docs/reference/functions/middleware-and-helpers).

```js:title=src/api/contact-form.js
export default function contactFormHandler(req, res) {
Expand Down

0 comments on commit ea5f3f4

Please sign in to comment.