mirror of
https://github.com/Kong/insomnia.git
synced 2026-06-18 04:53:50 -04:00
14 lines
373 B
JavaScript
Executable File
14 lines
373 B
JavaScript
Executable File
const fetchOptions = {
|
|
mode: 'cors',
|
|
method: 'POST',
|
|
headers: {
|
|
'content-type': 'application/json',
|
|
},
|
|
body:
|
|
'{"number":1,"string":"f\\"oo","arr":[1,2,3],"nested":{"a":"b"},"arr_mix":[1,"a",{"arr_mix_nested":{}}],"boolean":false}',
|
|
};
|
|
|
|
fetch('http://mockbin.com/har', fetchOptions)
|
|
.then(response => response.json())
|
|
.then(data => console.log(data));
|