项目作者: loatheb

项目描述 :
auto handle response after fetch
高级语言: JavaScript
项目地址: git://github.com/loatheb/fetch-helper.git
创建时间: 2017-03-20T16:02:12Z
项目社区:https://github.com/loatheb/fetch-helper

开源协议:

下载


Fetch-Helper

auto handle response after fetch

Install

  1. npm i --save fetch-helper

Usage

  1. import handleResponse from 'fetch-helper'
  2. import {handleResponse} from 'fetch-helper'

or

  1. var handleResponse = require('fetch-helper')
  1. fetch('/path/to/data')
  2. .then(handleResponse)
  3. .then(res => {
  4. // data here.
  5. })