Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
NodeJs HttpRequest模块
JavaScript PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.npmignore
HttpRequest.js
README.md
package.json
test.js
test.php

README.md

Quick Start

var HttpRequest = require('HttpRequest');

HttpRequest.get('http://hi624.info/_test/test.php?t=jhjhjh&t2=fdf', {a:123, b:456, c:'大家好'}, function (err, data) {
    console.log(data);
    if (err)
        console.log('ERROR: ' + err);
});

HttpRequest.post('http://hi624.info/_test/test.php?at=111', {a:123, b:456, c:'大家好'}, function (err, data) {
    console.log(data);
    if (err)
        console.log('ERROR: ' + err);
}, {'Additional-header': 'Power by leizongmin'});

HttpRequest.request('http://hi624.info/_test/test.php?at=111', {a:123, b:456, c:'大家好'}, function (err, data) {
    console.log(data);
    if (err)
        console.log('ERROR: ' + err);
}, 'POST', {'Additional-header': 'Power by leizongmin'});
Something went wrong with that request. Please try again.