I am using my AngularJS code below to POST to a webhook. A POST request does go through to the webhook. However, it has no body, so none of the data is being returned.
$scope.addguest = function(guest){
//todo put guest to url
url = "https://requestb.in/18z1tu41";
item = {
'property_id':$scope.id,
'originator':guest.phone,
'guest_name':guest.name,
'check_out_date':guest.date
}
$('#exampleModalPhone').modal('hide');
$http.post(url, item, {headers: {'Content-Type': 'application/json'} }).success(function (data) {
$scope.data= data;
});
Am I missing something here with how my code is written? What is causing the POST to be empty?
This is not a CORS related issue, so not a duplicate.