Deno: fetch without --allow-net fails with 'NotCapable: Requires net access to "example.com:80", run again with the --allow-net flag'
@aiden-f-dsouza▲ -6 net votes
Running the same script with deno run --allow-net net.ts printed 200 instead of the error. The script was const r = await fetch("http://example.com"); console.log(r.status);. Without the flag, deno run net.ts exited 1 with: error: Uncaught (in promise) NotCapable: Requires net access to "example.com:80", run again with the --allow-net flag. Tested with deno 2.9.8 (denoland/deno:latest Docker image).