Fetch JS snippet (#1343)

* Add test for fetch snippet

* Add fetch snippet

* Fix jQuery doc comment
This commit is contained in:
Ángel Paredes
2019-03-11 22:20:38 +00:00
committed by Gregory Schier
parent 086f338182
commit 7fe101ba9b
18 changed files with 249 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
const fetchOptions = {
mode: 'cors',
method: 'GET',
headers: {},
};
fetch('https://mockbin.com/har', fetchOptions)
.then(response => response.json())
.then(data => console.log(data));