0.0.4 • Published 6 years ago

sketch-fetch-complete v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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))
0.0.4

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago