Trying to post a simple object through nodejs using request http module, every time I try to send my data to my API it showing this options.uri is a required argument yet I provided a URL end point where to POST the data.
var url = 'http://omcloud.azurewebsite.net/api/Test';
request.post(url,
{ json: { "Definition": "Test"} },
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body)
}
}
);
Can someone shed a light what's wrong with the code above?