fengxinming / tammy

:zap: Promise based HTTP client for the browser and node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tammy

Note: A progressive HTTP client for the browser and node.js

npm package


Package Version Docs Description
tammy npm
tammy-adapter-xhr npm
tammy-adapter-request npm
tammy-plugin-xsrf npm
tammy-mock npm

Usage

import { http } from 'tammy';
import xhr from 'tammy-adapter-xhr';
http.defaults.adapter = xhr;

http.get('/user?ID=12345')
  .then(function (response) {
    // 处理成功情况
  })
  .catch(function (error) {
    // 处理异常情况
  });

License

MIT

About

:zap: Promise based HTTP client for the browser and node.js

License:MIT License


Languages

Language:JavaScript 100.0%