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

151
Vistas
Axios Proxy Request net::ERR_CONNECTION_REFUSED

Tried to send an HTTP POST request through Axios with a proxy server as an intermediary, it returns the following error

POST http://localhost:7777/client-app/client/login net::ERR_CONNECTION_REFUSED

First I set up a proxy server by creating an SSH tunnel

ssh -D 5001 username@x.x.x.x

then to create a proxy server listening on 8081

hpts -s 127.0.0.1:5001 -p 8081

At this point I made a request through Postman and everything works fine but when I make a JS script with Axios to send the same POST request

axios.post(
    serverSide.login,
    {
        client_id: this.form.username, 
        password: this.form.password
    },
    {
        proxy: {
            protocol: 'http',
            host: '127.0.0.1',
            port: 8081,
            auth: {
                username: 'someusername',
                password: 'somepassword'
            }
        }
    }
).then((res) => {
    // do something here
})

doing so causes the aforementioned error. Any idea what causes the issue and how to debug it?

about 4 years ago · Juan Pablo Isaza
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