javascript - Convert this cURL command with proxy to a Node.JS code -


i have following curl command:

curl.exe -x -k _https://url --proxy proxy.example:80 --proxy-user "user:password"  

i've been trying using global proxy global-tunnel or node-tunnel dont know if correct approach

the question how transform curl command in node.js code

i guess must simple solutions couldn't figure out

i use request library.

import request 'request' const params = {   method: 'get',   url: 'https://url',   proxy: 'http://user:password@proxy.example:80' } request(params, (err, result) => {   if (err) throw err   // handle result... }) 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -