Package Exports
- beer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (beer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
beer 
a useful warpper of request. have a drink and waiting for results callback.
How to install
$ npm install beerSample code
var beer = require('beer');
beer.get("http://google/com",{
query: {
param: 1,
param2: 2
}
},function(err,result){
if (!err) {
// enjoy !
console.log(result)
} else {
console.log('Opps !!');
}
});API
beer.get(url,params,callback)
url[String]params[Object]querykey:value: params will joinURLas?key=value
callback[Funtion]- error : null or error object
- result : fetch result
beer.post(url,params,callback)
url[String]params[Object] sent asformkey:value
callback[Funtion]- error : null or error object
- result : fetch result
Run unit-test (Mocha)
$ git clone https://github.com/turingou/beer.git
$ cd beer
$ npm install // will install mocha localy
$ npm test