mnd-http-client

0.0.1 • Public • Published

Installation

In Node.js:

var HttpClient = require('mnd-http-client');
var client = new HttpClient();
var data = 'a=1';
var _header = {'Cookie':'xxx'};

client.post(url,data,function(error,result,response) {
		if(error==null){
			//var jsonObj = JSON.parse(result);
			//console.log(jsonObj);
			callOtherFunc(response.headers['set-cookie']);
		}else{
			console.log(error);
		}
	});

client.get(url,function(error,result,response) {
		if(error==null){
			//var jsonObj = JSON.parse(result);
			//console.log(jsonObj);
		}else{
			console.log(error);
		}
	},null,_header);

Readme

Keywords

Package Sidebar

Install

npm i mnd-http-client

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

7.88 kB

Total Files

4

Last publish

Collaborators

  • tringoo