I am having an issue while trying to perform a $http.post to the IFTTT maker channel. Below is the code I am using to perform the POST:
$http.post(
'https://maker.ifttt.com/trigger/{my-event}/with/key/{my-key}',
{value1:"hello",value2:"goodbye"}
).then(
function successCallback(response) {
console.log(response);
},
function errorCallback(response) {
console.log("error: ",response);
});
The response I get is the following:
XMLHttpRequest cannot load https://maker.ifttt.com/trigger/{my-event}/with/key/{my-key}.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
I have the cordova-whitelist plugin and have tried various solutions adding Access-Control-Origin
to the header and still get a similar response.