Skip to content

⚡ Promise based HTTP client for the browser and node.js

License

Notifications You must be signed in to change notification settings

fengxinming/tammy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

⚡ Promise based HTTP client for the browser and node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published