Skip to content

Commit

Permalink
chore(examples): fix typos (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
iiio2 authored Nov 29, 2024
1 parent 1e6749a commit 500e672
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { createApp, createRouter, readJSONBody } from "h3";
export const app = createApp();

const router = createRouter()
.get("/", () => "use POST method to try!")
.get("/", () => "use GET method to try!")
.post("/", async (event) => {
const body = await readJSONBody(event);
// Use can also use `readFormDataBody` to get a FormData object, `readMultiPartFormData` to get an array of MultiPartData or `readRawBody` to get a Buffer.
// You can also use `readFormDataBody` to get a FormData object, `readMultiPartFormData` to get an array of MultiPartData or `readRawBody` to get a Buffer.
return {
body,
};
Expand Down
2 changes: 1 addition & 1 deletion examples/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const app = createApp({ debug: true });

const router = createRouter()
.get("/", () => {
// Always "throw" errors to propgate them to the error handler
// Always "throw" errors to propagate them to the error handler
throw createError({ statusMessage: "Simple error!", statusCode: 301 });
})
.get("/complexe-error", () => {
Expand Down

0 comments on commit 500e672

Please sign in to comment.