bun
bun copied to clipboard
Add proxy option to fetch()
Hi @Jarred-Sumner.
Please accept my PR to add the proxy option to the fetch call.
One question I have is how to handle the scenario when proxy is http but the url is https. I am assuming this wont work as I imagine that an https url requires an https proxy. Should it throw an error in that scenario?
One other possiblilty is that we forcefully change the scheme of the proxy url to match the request url :)
Cheers. Sumeru
Also I wanna add tests for this but to do that I would have to create a proxy server in the test itself which seems a bit overkill. Whats your opinion on whether we need tests for this feature?