Files
StevenandGitHub 79ed8e13b0 Add keepAlive to node-fetch polyfill (#27376)
Fixes #27109 

This PR adds a default `agent` as described in the [`node-fetch` docs](https://github.com/node-fetch/node-fetch#custom-agent).

We should see about 2x perf according to some [benchmarks](https://github.com/Ethan-Arrowood/undici-fetch/blob/main/benchmarks.md#fetch).
2021-07-22 14:34:33 +00:00

6 lines
166 B
JavaScript

export default async function handler(_req, res) {
const fetchRes = await fetch('http://localhost:44001')
const props = await fetchRes.json()
res.json(props)
}