Skip to content

anthinkingcoder/fetch-polyfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetch-polyfill

a fetch polyfill(es6 style)

Installation

  • npm install ywl-fetch --save;

Usage

import 'ywl-fetch'
fetch('./mock/a.json')
        .then(function (response) {
                return response.json()
        }).then(json => {
                console.info(json)
      })

Script

  <script src="./dist/fetch-polyfill.js"></script>
  <script>
  fetch('./mock/a.json')
            .then(function (response) {
                    return response.json()
            }).then(json => {
                    console.info(json)
          })
</script>

Support

ie10+ or chrome etc.

About

a fetch polyfill(es6 style)

Resources

Stars

Watchers

Forks

Packages

No packages published