-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
NodeJS' node-fetch
supports agent
field in its options where different agents from external modules which implement different proxy protocols may be provided. There is no such mechanism in Deno.
Because Deno tries to maintain full compatibility with browser JS and the standard, you will not modify v8's fetch, as far as I understand. However, the inability to quickly and conveniently make an HTTP request through a proxy is a big omission for Deno, which positions itself, among other things, as a general purpose scripting tool.
In fact, we can use system sockets for this, but then we will have to rewrite HTTP, SSL, TLS, SOCKS4 and SOCKS5 protocols from scratch. It would be nice to somehow solve this problem.
UPD.
Sorry, question removed. I found Deno.createHttpClient. By the way, it would be nice to point out here that this works not only with HTTP proxies, but also with SOCKS.