0

I'm using fetch API to call a URL which has some SSL settings and after calling it I straight away have to login in order to access the contents and I get this error while calling it

net::ERR_INSECURE_RESPONSE

my code is

  let header = new Headers({
  'Access-Control-Allow-Origin':'',
  'Content-Type': 'multipart/form-data'
  });
let username="***";
let password="***";
let url ="***";
let sentData={
    method:'POST',
    mode: 'cors',
    header: header
};
return new Promise((reslove,reject)=>{
    fetch(url, sentData)
        .then(response=> response.json())
        .then(responseText=>{

            console.log(responseText);

        }).catch(err=>{
        console.log(err);
    });
}).catch(err => {
        console.log(err);
    });

Sorry I can't share the URL, username and password. How do I solve this?

Michał Turczyn
  • 32,028
  • 14
  • 47
  • 69
ANISHA
  • 43
  • 1
  • 1
  • 8

0 Answers0