Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: ✏️ Fixed incomplete sentence #7625

Closed
wants to merge 3 commits into from

Conversation

benhalverson
Copy link
Member

Description

Fixes incomplete sentence.

Validation

Related Issues

#7568

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@Copilot Copilot bot review requested due to automatic review settings April 6, 2025 21:53
@benhalverson benhalverson requested a review from a team as a code owner April 6, 2025 21:53
Copy link

vercel bot commented Apr 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Apr 7, 2025 4:45am

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Copy link
Contributor

github-actions bot commented Apr 6, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟠 76 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 100 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 98 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

Copy link
Contributor

github-actions bot commented Apr 6, 2025

Unit Test Coverage Report

Title Lines Statements Branches Functions
@node-core/ui-components Coverage: 95%
95.83% (161/168) 77.86% (102/131) 88.57% (31/35)
@nodejs/website Coverage: 87%
84.73% (494/583) 76.03% (165/217) 86.99% (107/123)
Title Tests Skipped Failures Errors Time
@node-core/ui-components 24 0 💤 0 ❌ 0 🔥 5.053s ⏱️
@nodejs/website 156 0 💤 0 ❌ 0 🔥 6.29s ⏱️

Removed referrer note and rewrote Credentials commonent
Comment on lines +68 to +71
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 are that the Node.js version includes the following:

- Credentials: Node.js can send credentials (i.e. the Authorization header), and it can handle Cookies, it just doesn't keep a session.
- Caching: The cache option is not supported in Node.js, as there is no built-in cache mechanism comparable to that in a browser.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 are that the Node.js version includes the following:
- Credentials: Node.js can send credentials (i.e. the Authorization header), and it can handle Cookies, it just doesn't keep a session.
- Caching: The cache option is not supported in Node.js, as there is no built-in cache mechanism comparable to that in a browser.
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 are that the Node.js version includes the following limitations:
- Sessions: Although the Node.js Fetch API can receive and send session-like data (i.e. Cookies), it does not store this data between requests.
- Caching: The cache option is not supported in Node.js, as there is no built-in cache mechanism comparable to that in a browser.

@avivkeller
Copy link
Member

PTAL @nodejs/undici

@avivkeller avivkeller disabled auto-merge April 7, 2025 18:35
@benhalverson benhalverson deleted the fetch-docs branch April 8, 2025 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incomplete sentence in fetch docs Incomplete sentence in docs
2 participants