hello!
i need to make web request with data...
I found this condition:
but i see that there are no option for data value..
i need something like this
is it possible to make web request using skript with settable data value?
EDIT: + settable this two options:
i need to make web request with data...
I found this condition:
but i see that there are no option for data value..
i need something like this
Java:
$.ajax({
url: "https://maker.ifttt.com/trigger/Anime-Sugg/with/key/CENSORED",
type: 'POST',
dataType: 'json',
contentType: 'application/json',
processData: false,
-------> data: '{"value1":"'+email+'","value2":"'+content+'"}', <-------
error: function(data) {
if(data.status === 0)
writeAlert('err', 'Cancel', 'No internet connection.<br>Error: ' + data.status);
else if(data.status == "201")
writeAlert('err', 'Cancel', 'Server error.<br>Error: ' + data.status);
else if(data.status == "404")
writeAlert('err', 'Cancel', 'Page not found<br>Error: ' + data.status);
else if(data.status == "500")
writeAlert('err', 'Cancel', 'Internal Server Error.<br>Error: ' + data.status);
else if(data.readyState != 4)
writeAlert('err', 'Cancel', 'Unknow error.');
else
writeAlert('err', 'Cancel', 'Unknow error.<br>Error: ' + data.status);
},
complete: function(r){
if(r.responseText == "Congratulations! You've fired the Anime-Sugg event" && r.status == 200 && r.readyState == 4) {
writeAlert('suc', 'OK', 'Suggestion has been successfully sent!');
chrome.extension.getBackgroundPage().startCountdown();
}
}
});
EDIT: + settable this two options:
Java:
dataType: 'json'
contentType: 'application/json'
Last edited: