Using credentials in url with fetch:
fetch('https://test:test@example.com').catch(console.error)
Results in an error:
TypeError: Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials
This is correct according to the specs:
If parsedURL includes credentials, then throw a TypeError.
What is the reason to put a restriction like this?
Is using credentials in url a bad practice?