Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!