From e17ad7bd088b3423dcd5cab35889648aa4e02d13 Mon Sep 17 00:00:00 2001 From: iiio2 Date: Wed, 9 Oct 2024 07:59:49 +0600 Subject: [PATCH] chore(error-handling): fix typos --- README.md | 4 ++-- examples/error-handling.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 720a8145..993c6eb8 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ If an object or a class with a `.toJSON()` method is passed to the `body` option For `PUT`, `PATCH`, and `POST` request methods, when a string or object body is set, `ofetch` adds the default `content-type: "application/json"` and `accept: "application/json"` headers (which you can always override). -Additionally, `ofetch` supports binary responses with `Buffer`, `ReadableStream`, `Stream`, and [compatible body types](https://developer.mozilla.org/en-US/docs/Web/API/fetch#body). ofetch will automatically set the `duplex: "half"` option for streaming support! +Additionally, `ofetch` supports binary responses with `Buffer`, `ReadableStream`, `Stream`, and [compatible body types](https://developer.mozilla.org/en-US/docs/Web/API/fetch#body). `ofetch` will automatically set the `duplex: "half"` option for streaming support! **Example:** @@ -281,7 +281,7 @@ await ofetch("/movies", { ## 🍣 Access to Raw Response -If you need to access raw response (for headers, etc), can use `ofetch.raw`: +If you need to access raw response (for headers, etc), you can use `ofetch.raw`: ```js const response = await ofetch.raw("/sushi"); diff --git a/examples/error-handling.mjs b/examples/error-handling.mjs index 4a0fcfdf..af49e397 100644 --- a/examples/error-handling.mjs +++ b/examples/error-handling.mjs @@ -8,6 +8,6 @@ try { // Error will be pretty printed console.error(error); - // This allow us to access the error body + // This allows us to access the error body console.log(error.data); }