I am trying to access a web-Api (Prestashops Web API to be exact) and fetch seems to have a problem with an url in this format : http://SOMEKEY12345@www.example.com
. In both Chrome and Postman everything works perfectly fine but using the fetch-API I always get an 401
Error.
Here is my Typescript Code :
public fetchData() {
fetch("http://SOMEKEY1234@www.example.com").then((response : Response)=>{
response.text().then((text : string) =>console.log(text));
})