xhr:一个小的xhr包装器

xhr一个小的XMLHttpRequest包装器。设计用于使用,等。 API的一个子集这样你就可以在两个node.js中,通过使用浏览器的作品写的代码require('request')在你的代码,并告诉您的浏览器捆绑到加载xhr而不是request 。对于browserify,将一个字段添加到package.json : "browser": { "request": "xhr" }对于的WebPack,一个加场到您的配置: "resolve": { "alias": { "request$": "xhr" } }浏览器支持:IE8 +和其他所有功能。安装npm install xhr例var xhr = require ( "xhr" ) xhr ( { method : "post" , body : someJSONString , uri : "/foo" , headers : { "Content-Type" : "application/json" } } , fu
zip
xhr-master.zip 预估大小:12个文件
folder
xhr-master 文件夹
file
.gitignore 34B
file
package.json 1KB
file
package-lock.json 109KB
file
.travis.yml 34B
file
CONTRIBUTING.md 1KB
file
index.js 7KB
file
LICENCE 1KB
file
README.md 9KB
file
.npmignore 17B
folder
test 文件夹
file
index.js 11KB
file
mock-server.js 552B
file
index.d.ts 1KB
zip 文件大小:35.92KB