mirror of
https://github.com/Kong/insomnia.git
synced 2026-06-18 04:53:50 -04:00
Fetch JS snippet (#1343)
* Add test for fetch snippet * Add fetch snippet * Fix jQuery doc comment
This commit is contained in:
committed by
Gregory Schier
parent
086f338182
commit
7fe101ba9b
9
packages/insomnia-httpsnippet/test/fixtures/output/javascript/fetch/https.js
vendored
Executable file
9
packages/insomnia-httpsnippet/test/fixtures/output/javascript/fetch/https.js
vendored
Executable 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));
|
||||
Reference in New Issue
Block a user