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
Copy file name to clipboardExpand all lines: README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,14 +134,16 @@ const es = new EventSource('https://my-server.com/sse', {
134
134
135
135
#### HTTP/HTTPS proxy
136
136
137
-
Use a package like [`node-fetch-native`](https://github.com/unjs/node-fetch-native) to add proxy support, either through environment variables or explicit configuration.
137
+
Use a package like [`undici`](https://github.com/nodejs/undici) to add proxy support, either through environment variables or explicit configuration.
138
138
139
139
```ts
140
-
// npm install node-fetch-native --save
141
-
import {fetch} from'node-fetch-native/proxy'
140
+
// npm install undici --save
141
+
import {fetch, EnvHttpProxyAgent} from'undici'
142
+
143
+
const proxyAgent =newEnvHttpProxyAgent()
142
144
143
145
const es =newEventSource('https://my-server.com/sse', {
0 commit comments