From 95db3247485b2d1ed553c98e2231379e58a0ace2 Mon Sep 17 00:00:00 2001 From: Chris Knight Date: Sat, 12 Sep 2020 13:03:18 +0100 Subject: doc: improve Examples (#7428) --- docs/examples/fetch_data.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs/examples/fetch_data.md') diff --git a/docs/examples/fetch_data.md b/docs/examples/fetch_data.md index ad47e90b1..737ce29cf 100644 --- a/docs/examples/fetch_data.md +++ b/docs/examples/fetch_data.md @@ -1,5 +1,15 @@ # Fetch Data +## Concepts + +- Like browsers, Deno implements web standard APIs such as + [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). +- Deno is secure by default, meaning explicit permission must be granted to + access the network +- See also: Deno's [permissions](../getting_started/permissions.md) model + +## Overview + When building any sort of web application developers will usually need to retrieve data from somewhere else on the web. This works no differently in Deno than in any other JavaScript application, just call the the `fetch()` method. @@ -12,6 +22,8 @@ prohibited. To make a call over the web Deno must be explicitly told it is ok to do so. This is achieved by adding the `--allow-net` flag to the `deno run` command. +## Example + **Command:** `deno run --allow-net fetch.ts` ```js -- cgit v1.2.3