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
Post a Comment