PythonMonkey
PythonMonkey copied to clipboard
Support HTTP proxy for XHR
const xhr = new XMLHttpRequest();
xhr.open('GET', 'http://example.com');
...
// Set HTTP proxy
xhr.proxy = 'http://localhost:5001';
xhr.send();
How do you think we should enable the HTTP proxy? Environment variable? Can we support proxy.pac files somehow? How do we do authentication? Proxies sometimes use basic, but often use digest. Can we also support SOCKS5 easily?
The way the Node.js XHR does this is completely insane, so let's not copy that.
Maybe an argument to the XHR constructor?