I am using unirest in nodejs to send a PUT request to update the contacts.
unirest.put(url)
.header({
'Authorization': 'Bearer '+result.profileData.split('?access_token=')[1],
'If-Match': '*',
})
.send({"entry":{"phoneNumber":req.body.mobile}})
.end(function (res1) {
res.send(res1);
});
}
I am getting response: Object {statusCode: 415, body: "Content-Type application/x-www-form-urlencoded is not a valid input type.", headers: Object, request: Object}
I am sending the data as .send({"entry":{"phoneNumber":req.body.mobile}}) and I am not sure this is the correct format?
I didn't find any documentation on this based on javascript. Help would be appreciated