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(readme): remove async infront of response.clone() #1560

Merged
merged 1 commit into from May 20, 2022

Conversation

SgtPooki
Copy link
Contributor

Purpose

Reduce confusion

Changes

Update readme to remove an awaited response.clone() call in the highWaterMark section.

Additional information

source code shows response is a sync call to a new Response constructor:

node-fetch/src/response.js

Lines 84 to 101 in 3944f24

/**
* Clone this response
*
* @return Response
*/
clone() {
return new Response(clone(this, this.highWaterMark), {
type: this.type,
url: this.url,
status: this.status,
statusText: this.statusText,
headers: this.headers,
ok: this.ok,
redirected: this.redirected,
size: this.size,
highWaterMark: this.highWaterMark
});
}


  • I updated readme

@jimmywarting jimmywarting changed the title docs(readme): response.clone() is not async docs(readme): remove async infront of response.clone() May 20, 2022
@jimmywarting jimmywarting merged commit 6ae9c76 into node-fetch:main May 20, 2022
@github-actions
Copy link

github-actions bot commented Jun 1, 2022

🎉 This PR is included in version 3.2.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants