hello. i'm trying to send a request with nodejs server and it gives me connect etimedout 10.10.34.36:443 error. if i send the request from fron-end it works fine.
my code:
const fetch = require("node-fetch");
module.exports = {
async home() {
try {
const response = await fetch(
"https://api.themoviedb.org/3/tv/popular?api_key=********&language=en-US&page=1"
);
const responseData = await response.json();
console.log(responseData);
} catch (error) {
throw new Error(error);
}
}
};
No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.
Desitgeu valorar o afegir aquest element a una llista?
No n'ets membre?
Resposta per Travis Bell
el 2 i de 2021 a les 10:54 A.M.
Hi @mohammad-tn,
10.10.34.36
is a private IP (an IP address on your LAN). We can't help with that. If you're seeing an error connecting to the public service let us know.