NodeJS Send json to webservice

12 views
Skip to first unread message

Nikos Galanakis

unread,
Feb 11, 2016, 1:14:27 PM2/11/16
to nodejs
Hi ,
i am trying to post a json to a web service built with .net.I use above code :
var request = require('request');
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    service: "login",
    username: "username",
    password: "password",
    appId: "2002"
  })
}, function(error, response, body){
    console.log(response.body);
});

The response is:

=Kk0Т4H~Qv֖dljS0ta^$?M

                                   Ŕu]

                                          -3P

d]E粤&ǮDt!{A}-8Ő"yau9RH^kD,xR8el2&0<'96^R{&D^׷?_/zZ\QUݾ:NZMPZrԮyZc)^r~;\-@JT{oHޡmƶDHg긮e>89|$SIIkGgU&YKT

q_


Does any anyone knows why it falls?

Reply all
Reply to author
Forward
0 new messages