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

fix 648 url object #697

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

berndfuhrmann
Copy link
Contributor

Issue #, if available:
#648
Description of changes:
Implementation:
args[0] in fetch_p.js, line 74 could be any stringifyable object, not just a string. That object should be converted to a string and used as URL. The only exception to this is if args[0] is already a request object.
This PR assumes that such a request object must be from the same implementation as the one given by requestClass. So if you would put a one Request object from e.g. node-fetch into the native fetch implementation, this will stringify that request object.
I couldn't find any "official" way to distinguish between a request object and a stringifyable object. But you're supposed to call fetch with the corresponding request implementation, I think this is fair game.

For that reason, the test was changed, so it will provide the native Request object.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@berndfuhrmann berndfuhrmann requested a review from a team as a code owner November 18, 2024 10:01
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.56%. Comparing base (3b89008) to head (96043e3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #697   +/-   ##
=======================================
  Coverage   83.56%   83.56%           
=======================================
  Files          36       36           
  Lines        1813     1813           
=======================================
  Hits         1515     1515           
  Misses        298      298           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants