summaryrefslogtreecommitdiff
path: root/docs/examples/fetch_data.md
diff options
context:
space:
mode:
authorChris Knight <cknight1234@gmail.com>2020-09-12 13:03:18 +0100
committerGitHub <noreply@github.com>2020-09-12 08:03:18 -0400
commit95db3247485b2d1ed553c98e2231379e58a0ace2 (patch)
treec6f5153101d77d2ce9342ea76fc69815ec51ccd8 /docs/examples/fetch_data.md
parent10fbfcbc79eb50cb7669b4aaf67f957d97d8d93b (diff)
doc: improve Examples (#7428)
Diffstat (limited to 'docs/examples/fetch_data.md')
-rw-r--r--docs/examples/fetch_data.md12
1 files changed, 12 insertions, 0 deletions
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