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

Add new disableRequest option to perform fetch with a bare URL #12

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

cuibonobo
Copy link
Member

This PR allows passing the URL directly to the fetch function without creating a Request object first. With these changes, we don't get an ERR_INVALID_URL error when using non-fully-qualified URLs like /foo.

A side effect of the disableRequest option is that the AxiosResponse object will only have this URL in its request property. This means that accessing, for example, response.request.url will throw an error.

Copy link

codecov bot commented Dec 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9fd0852) 100.00% compared to head (eb74460) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           96        97    +1     
  Branches        32        34    +2     
=========================================
+ Hits            96        97    +1     

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

@cuibonobo cuibonobo merged commit b006311 into main Dec 23, 2023
3 checks passed
@cuibonobo cuibonobo deleted the adele-stash branch December 23, 2023 01: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.

None yet

1 participant