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

[experimental fetch] No support for URLs #43141

Closed
espoal opened this issue May 18, 2022 · 2 comments
Closed

[experimental fetch] No support for URLs #43141

espoal opened this issue May 18, 2022 · 2 comments

Comments

@espoal
Copy link

espoal commented May 18, 2022

Version

v18.2.0

Platform

Linux mamluk-ATX 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

fetch

What steps will reproduce the bug?

const url = new URL('https://google.com/')

const resp = await fetch(url)

console.log({resp})

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

Fetch should request the URL

What do you see instead?

Fetch does not support URL objects as input

Additional information

It works in the browser, so I would expect to work also on node.

@targos
Copy link
Member

targos commented May 18, 2022

The code you posted works fine in Node.js 18.

@espoal
Copy link
Author

espoal commented May 18, 2022

Sorry you are right, it was a simple typo.

@espoal espoal closed this as completed May 18, 2022
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

No branches or pull requests

2 participants