Open florisvink opened 5 years ago
Emit the tunnel CONNECT response to the parent request. This makes it possible to debug or gain insights in the tunneling process.
Example that logs a response header from the proxy service:
const onTunnelReponse = t => console.log(t.headers['x-proxy-header']) const onRequest = r => r.once('tunnel_connect_response', onTunnelReponse) request.get({ url, proxy: `http://${puser}:${ppass}@${phost}`, tunnel: true }).once('request', onRequest)
This also solves #49 (@hashexclude: I think you want the tunnel response per request)
Emit the tunnel CONNECT response to the parent request. This makes it possible to debug or gain insights in the tunneling process.
Example that logs a response header from the proxy service:
This also solves #49 (@hashexclude: I think you want the tunnel response per request)