1.0.3 • Published 8 years ago

http-poster v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

http-poster 一个简单的发送请求的封装

###发送get请求

    var poster=require('http-poster');
    poster.get('你要请求的地址例如http://baidu.com',function(err,res,data){ 
       console.log(res);
       console.log(data);
     });

###发送post请求 ####默认是发送json格式

    var poster=require('http-poster');
    var data={foo:"foo",bar:"bar"};
    var jsonData=JSON.stringify(data);
    poster.post('你要请求的地址例如http://baidu.com',jsonData,function(err,data){
       console.log(data);
    });
1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago