1.0.12 • Published 7 years ago

ywl-fetch v1.0.12

Weekly downloads
53
License
-
Repository
-
Last release
7 years ago

fetch-polyfill

<<<<<<< HEAD a fetch polyfill(es6 style)

Installation

  • npm install ywl-fetch --save;

Usage

in this way, your need use babel to compile,.babelrc file like

{
  "presets": [
    [
      "env"
    ],
    "stage-2"
  ],
  "plugins": [
    "transform-runtime"
  ]
}
import {fetch,Response,Request} from '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.

======= a fetch polyfill,support interceptors

parent of 40b0a91... Update README.md

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago