Skip to content

Conversation

@aui
Copy link
Contributor

@aui aui commented Jan 20, 2025

Summary

The first parameter of fetch is request instead of resource.

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@ToriLindsay
Copy link
Contributor

@GregBrimble Do you mind confirming for accuracy? Thank you!

@GregBrimble
Copy link
Contributor

The resource parameter can be either a Request instance, or a string/stringifiable.

MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch#parameters

I think we should either keep it as it is, or go with input and init, which is another popular way of expressing this (and in fact, is what we use in our types).

@ToriLindsay
Copy link
Contributor

Thank you @GregBrimble - I'm afraid I don't understand this well enough to draft that change. Since you said it would be ok to keep as-is, I will go ahead and close this out. However, if you think it's worth changing to that input and init syntax, feel free to either draft that or let me know and I can find someone to help me with it.
Thank you to @aui for the suggestion! Please feel free to re-open if you wish to adapt this to Greg's suggestion instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants