Adds fetch demo.

This commit is contained in:
Henning Dieterichs
2020-10-06 23:33:23 +02:00
parent 28d02ca4ab
commit db1e5a8086
3 changed files with 13 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
"dependencies": {
"@hediet/node-reload": "0.7.3",
"@types/node": "^13.7.4",
"node-fetch": "^2.6.1",
"typescript": "^3.8.2"
},
"scripts": {

View File

@@ -0,0 +1,7 @@
const fetch = require("node-fetch");
fetch("https://jsonplaceholder.typicode.com/users")
.then((response) => response.json())
.then((json) => {
debugger;
});

View File

@@ -368,6 +368,11 @@ nise@^1.4.10:
lolex "^4.1.0"
path-to-regexp "^1.7.0"
node-fetch@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
normalize-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"