Node.js doesn't have built-in proxy support in its native fetch implementation the way some other languages do, so it usually requires a small helper library alongside your HTTP client of choice.
With axios
Axios accepts a proxy configuration object directly in its request config, specifying the host, port, and optional auth credentials, which axios then uses to route the request without any extra dependencies for basic HTTP proxies.
With native fetch
Node's built-in fetch doesn't support proxies natively, so the common approach is pairing it with an agent library (such as one that implements the HTTP/HTTPS proxy agent pattern) and passing that agent into the request options.
A practical note
Whichever library you use, test with a known-working proxy first before assuming your code is broken — a large share of 'my proxy code doesn't work' issues turn out to be a dead proxy rather than a configuration mistake.