Skip to content

Commit 2e2b27f

Browse files
committed
docs: ✏️ Fixed incomplete sentence
1 parent 9884c3e commit 2e2b27f

File tree

1 file changed

+5
-1
lines changed
  • apps/site/pages/en/learn/getting-started

1 file changed

+5
-1
lines changed

apps/site/pages/en/learn/getting-started/fetch.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ main().catch(console.error);
6565

6666
Undici allows you to customize the Fetch API by providing options to the `fetch` function. For example, you can set custom headers, set the request method, and set the request body. Here is an example of how you can customize the Fetch API with Undici:
6767

68-
The [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) function takes two arguments: the URL to fetch and an options object. The options object is the [Request](https://undici.nodejs.org/#/docs/api/Dispatcher?id=parameter-requestoptions) object that you can use to customize the request. The function returns a [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) that resolves to a [Response](https://undici.nodejs.org/#/docs/api/Dispatcher?id=parameter-responsedata) object. One difference between the Fetch API in the browser and the Fetch API in Node.js is that the Node.js version does not support
68+
The [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) function takes two arguments: the URL to fetch and an options object. The options object is the [Request](https://undici.nodejs.org/#/docs/api/Dispatcher?id=parameter-requestoptions) object that you can use to customize the request. The function returns a [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) that resolves to a [Response](https://undici.nodejs.org/#/docs/api/Dispatcher?id=parameter-responsedata) object. Some differences between the Fetch API in the browser and the Fetch API in Node.js is that the Node.js version include the following:
69+
70+
- Credentials: Node.js does not support the credentials option because it doesn't handle cookies or sessions as browsers do.
71+
- Caching: The cache option is not supported in Node.js, as there is no built-in cache mechanism comparable to that in a browser.
72+
- Referrer and Referrer Policy: The referrer option is not supported in Node.js because it lacks the concept of a referrer that exists in browser environments.
6973

7074
In the following example, we are sending a POST request to the Ollama API with a JSON payload. Ollama is a cli tool that allows you to run LLM's (Large Language Models) on your local machine. You can download it [here](https://ollama.com/download)
7175

0 commit comments

Comments
 (0)