Merge pull request #148 from GameScripting/master

Fixed bug with HTTP post in the http.request module
This commit is contained in:
Walter Higgins 2014-07-26 11:47:28 +01:00
commit 8941d1b627

View file

@ -70,15 +70,16 @@ exports.request = function( request, callback ) {
url = request;
requestMethod = 'GET';
}else{
url = request.url;
paramsAsString = paramsToString( request.params );
if ( request.method ) {
requestMethod = request.method;
requestMethod = request.method;
} else {
requestMethod = 'GET';
requestMethod = 'GET';
}
if ( requestMethod == 'GET' && request.params ) {
// append each parameter to the URL
url = request.url + '?' + paramsAsString;
// append each parameter to the URL
url = request.url + '?' + paramsAsString;
}
}
conn = new java.net.URL( url ).openConnection();