javascript - nodejs request returning null body from server for a POST request -
i sending http post request node using request (https://github.com/mikeal/request), , getting null body. same request getting sent hurl.it returning correct response correct body. request getting sent same nodejs server same server returning correct body. infuriating working last week , no longer working in nodejs.
my server.js is:
var request = require('request'); request({ uri: 'insert url here; contains sensitive info', method: 'post', body: 'insert body here; contains sensitive info', followredirect: true, maxredirects: 10 }, function(error, response, body) { console.log('body in response is: ' + body); });
anyone have idea how fix this?
thank you.
i resolved issue. server posting apparently expecting user agent in header wasn't sending, throwing null exception, , returning null. has since been fixed.
thank you.
Comments
Post a Comment