Sometimes http request get status failed. Then I change to https

As above, now https request get status failed. Then I change to http

I tested setting url radomly in request as follow
let urls = [
"http://uinames.com/api/?",
"https://uinames.com/api/?"
];
let url = urls[Math.floor(Math.random() * urls.length)];
if (cantidad !== '') {
url += `amount=${cantidad}&`;
}
Getting

Sometimes http request get status failed. Then I change to https

As above, now https request get status failed. Then I change to http

I tested setting url radomly in request as follow
Getting
