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

94
Views
How do I make a post request with proxy

I am new and I don't know how to make a post request with a proxy in node.js. I tried many methods but nothing works...

I have the proxy host, port, username and password.

How do I do this in node.js?

example: I want to make a post request to http://example.com sending this object {"a": 3} using a proxy.

Thank you a lot for any advice / help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found the solution:

const got = require('got');
const tunnel = require('tunnel');

(async () => {
    const { body } = await got.post("example.com", {
        json: {
            "a": 3
        },
        responseType: 'json',
        agent: {
            https: await tunnel.httpsOverHttp({
                proxy: {
                    host: "proxy host",
                    port: 0,
                    proxyAuth: "user:pass"
                },
            }),
        }
    });
    console.log(body);
})();
about 4 years ago · Juan Pablo Isaza Report
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!