I wanted to know, how to pass the json request in the payload, for eg: {\'name\' : \'test\', \'value\' : \'test\'}:
{\'name\' : \'test\', \'value\' : \'test\'}
var post_data = {}; var post_op
Just convert to a string and send.
post_req.write(JSON.stringify(post_data));