Skip to content

Conversation

Xmader
Copy link
Member

@Xmader Xmader commented May 26, 2025

const xhr = new XMLHttpRequest();
xhr.open('GET', 'http://example.com');
...
// Set HTTP proxy
xhr.proxy = 'http://localhost:5001';

xhr.send();

@wesgarland
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants