A fetch polyfill for sketch inspired by unfetch. It is automatically included (when needed) when using skpm.
npm i -S sketch-fetch-complete
const fetch = require('sketch-fetch-complete')
fetch("https://google.com")
.then(response => response.text())
.then(text => console.log(text))
.catch(e => console.error(e))
upload file
const fetch = require('sketch-fetch-complete')
fetch("https://google.com", {
method: 'post',
formdata: {
files: [path],
...objects,
}
})
.then(response => response.json())
.then(text => console.log(text))
.catch(e => console.error(e))