mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-23 06:10:02 +08:00
17 lines
483 B
TypeScript
17 lines
483 B
TypeScript
// @dynamic
|
|
// Vercel installs this dispatcher when ordinary proxy environment variables
|
|
// are present, without requiring Node's global NODE_USE_ENV_PROXY opt-in.
|
|
import { EnvProxyDispatcher } from "vercel-env-proxy-dispatcher";
|
|
|
|
declare global {
|
|
interface RequestInit {
|
|
dispatcher?: EnvProxyDispatcher;
|
|
}
|
|
}
|
|
|
|
const response = await fetch(`${process.argv[2]}/text`, {
|
|
dispatcher: new EnvProxyDispatcher(),
|
|
});
|
|
const body: string = await response.text();
|
|
console.log(body);
|