docs: general updates to documentation pages (#13055)

This commit is contained in:
Shahed Nasser
2025-07-28 10:52:22 +03:00
committed by GitHub
parent 6e66e36d08
commit cd599e1f62
10 changed files with 234 additions and 138 deletions
@@ -8,7 +8,7 @@ In this chapter, you'll learn about how to add new API routes for each HTTP meth
## HTTP Method Handler
An API route is created for every HTTP method you export a handler function for in a route file.
An API route is created for every HTTP method you export a handler function for in a `route.ts` or `route.js` file.
Allowed HTTP methods are: `GET`, `POST`, `DELETE`, `PUT`, `PATCH`, `OPTIONS`, and `HEAD`.
@@ -39,7 +39,7 @@ export const POST = async (
}
```
This adds two API Routes:
This file adds two API Routes:
- A `GET` route at `http://localhost:9000/hello-world`.
- A `POST` route at `http://localhost:9000/hello-world`.
- A `GET` API route at `http://localhost:9000/hello-world`.
- A `POST` API route at `http://localhost:9000/hello-world`.