mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
When enabled, Node.js parses the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables during startup, and tunnels requests over the specified proxy. This currently only affects requests sent over `fetch()`. Support for other built-in `http` and `https` methods is under way. PR-URL: https://github.com/nodejs/node/pull/57165 Refs: https://github.com/nodejs/undici/issues/1650 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
4 lines
108 B
JavaScript
4 lines
108 B
JavaScript
const response = await fetch(process.env.FETCH_URL);
|
|
const body = await response.text();
|
|
console.log(body);
|