You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since v18, Node ships with a native fetch client. This client requires a different way to specify an HTTP proxy than what we've been supporting in our SDKs so far.
To specify an HTTP proxy for Node's fetch, you need to use the following code (tested on Node v18.19 and v20.11):
we specify HTTP proxy using dispatcher instead of agent (agent is ignored on requests, which makes it hard to debug)
the ProxyAgent dispatcher comes from undici which seems to be maintained by Node folks. The ProxyAgent is incompatible with other agents that we used to use in the past.
We should update our FetchOptions interface to support specifying dispatcher.
Console Errors: no
Steps to Reproduce
Configure an http proxy as specified in our docs
Expected behavior: web requests intercepted by the specified proxy
Actual behavior: web requests passed through without being intercepted
Additional Context
Usage Information
SDK Version - 3.06
Node (Check, if using Node version of SDK)
Node Version - v18.19 and v20.11
The text was updated successfully, but these errors were encountered:
As far as I can tell, the only thing we need to change in the code is the type that defines fetch options, so that it includes the new dispatcher property. Other than that, we need to update docs and explain how to use it. The code itself works just fine.
Bug Report
Description
Since v18, Node ships with a native fetch client. This client requires a different way to specify an HTTP proxy than what we've been supporting in our SDKs so far.
To specify an HTTP proxy for Node's fetch, you need to use the following code (tested on Node v18.19 and v20.11):
What's noteworthy:
We should update our FetchOptions interface to support specifying dispatcher.
Console Errors: no
Steps to Reproduce
Expected behavior: web requests intercepted by the specified proxy
Actual behavior: web requests passed through without being intercepted
Additional Context
Usage Information
SDK Version - 3.06
The text was updated successfully, but these errors were encountered: