Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

186
Vistas
Server crashes when making an API call
app.post("/", (req, res) => {
    const origin = req.body.origin;
    const destination = req.body.destination;
    const urlOri = "https://api.openweathermap.org/data/2.5/weather?q=" + origin + "&APPID={mykey}"
    https.get(urlOri, function (response) {
        console.log(response);
    })
});

I have written this code and I am getting this error:

Server started on port 443
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: connect ETIMEDOUT 178.128.25.248:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketErrorListener (_http_client.js:469:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '178.128.25.248',
  port: 443
}

This same code runs on one of my friend's pc same as expected, what to do?

I have tried to do the same via request and axios module as well and I got the same error.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Sorry guys I was using a proxy server. I disabled it and now it's working fine

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda