sketch-fetch-complete
v0.0.4
Published
A fetch for sketch
Downloads
5
Readme
sketch-fetch-complete(fork by skpm/sketch-polyfill-fetch)
A fetch polyfill for sketch inspired by unfetch. It is automatically included (when needed) when using skpm.
Installation
npm i -S sketch-fetch-complete
Usage
const fetch = require('sketch-fetch-complete')
fetch("https://google.com")
.then(response => response.text())
.then(text => console.log(text))
.catch(e => console.error(e))
extra add
upload file
const fetch = require('sketch-fetch-complete')
fetch("https://google.com",{
method: 'post',
formdata: path
})
.then(response => response.text())
.then(text => console.log(text))
.catch(e => console.error(e))