Thanks Chris in my case, I used Charles and Request . There is a proxy option handle to put your charles port.
So, to find your port in the Charles Proxy menu-> Proxy Settings-> Http Proxy
Use this port number in any request, for example:
request.get(url, { 'proxy': 'http://localhost:<charles-proxy-port>' }, function (error, response, body) {
source share