Permalink
Browse files

Merge with conflicts

  • Loading branch information...
2 parents ba5b566 + 619ffab commit 792334cd495c13fbf91b94b76029d725b63074f3 @xfontro committed Oct 2, 2012
Showing 307 changed files with 19,597 additions and 73 deletions.
View
@@ -2,11 +2,12 @@ var http = require("http");
var req_options = {
host: '192.168.7.13',
- //host: '127.0.0.1',
+ //host: 'localhost',
port: '8080',
method: 'POST',
//path: '/sumar?op1=2&op2=4', //Exemple per a GET.
- path: 'http://aritmeticops-nodetestingsf.rhcloud.com/sumar', //Exemple per a POST.
+ path: 'http://aritmeticops-nodetestingsf.rhcloud.com/dividir', //Exemple per a POST.
+ //path: '/dividir',
headers: {
Host: "aritmeticops-nodetestingsf.rhcloud.com"
}
@@ -28,12 +29,12 @@ if(req_options.method === 'POST'){
var req = http.request(req_options, function(response){
var res_data='';
-
response.on('data', function(chunk){
res_data +=chunk;
});
response.on('end', function(){
console.log("El resultat es: " + JSON.parse(res_data).resultat);
+ console.log("JSON: "+res_data);
});
});
@@ -43,6 +44,7 @@ if(req_options.method === 'POST'){
});
req.write(data);
+ //console.log("The data i pass: "+data);
req.end();
} else if(req_options.method === 'GET'){
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 792334c

Please sign in to comment.