We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae6e2cf commit aa14f96Copy full SHA for aa14f96
docs/api-routes/introduction.md
@@ -22,7 +22,7 @@ API ルートは Next.js で**API**を構築する方法を提供しています
22
例えば、以下の API ルート `pages/api/user.js` は `json` レスポンスを `200` ステータスコードとともに返します:
23
24
```js
25
-export default function handler(req, res) => {
+export default function handler(req, res) {
26
res.status(200).json({ name: 'John Doe' })
27
};
28
```
@@ -35,7 +35,7 @@ API ルートを使用するためには、関数(**リクエストハンドラ*
35
API ルートで異なる HTTP メソッドを処理するには、次のようにリクエストハンドラの `req.method` を使うことができます:
36
37
38
39
if (req.method === 'POST') {
40
// POSTリクエストを処理します
41
} else {
0 commit comments