Here is some example call
import { request, setGlobalAgent, ProxyAgent } from 'undici'
setGlobalDispatcher(new ProxyAgent('https://my.proxy.agent/'))
const {
statusCode,
headers,
trailers,
body
// send the request via the https://my.proxy.agent/ HTTP proxy
} = await request('http://localhost:3000/foo')
console.log('response received', statusCode)
console.log('headers', headers)
for await (const data of body) {
console.log('data', data)
}
console.log('trailers', trailers)
Follow up from #568
Here is some example call
Follow up from #568