wulfeyW
Deno3y ago
1 reply
wulfey

Proper usage of `Deno.HttpClient`

Hi! I'm creating an application which allows the internal use of HTTP proxies for certain tasks.
In that case,
fetch()
requests are given an instance of
Deno.HttpClient
per proxy, but for multiple
fetch()
calls, if they're supposed to use the same proxy, the same
HttpClient
instance is used.
This is something I am curious about, should I create a new
HttpClient
for every executed
fetch()
, or is it fine to reuse the same
HttpClients
for multiple requests?
Was this page helpful?