von Retter0815 » 24. Nov 2016, 21:22
Anbei die Einstellungen:
URL:
https://api.pushover.net/1/messages.xml
Methode: Post
POST Content Typ: application/x-www-form-urlencoded
Parameter: token=<MEINTOKEN>&user=%address%&title=Alarmierung&priority=1&message=%message%
Skript:
public static bool ProcessResponse(int httpCode, String[] header, String content, out String result) {
if(httpCode == 200) {
result = content;
return true;
} else {
result = content;
return false;
}
}
public static void PrepareVariables(System.Collections.Generic.IDictionary<String, String> variables) {
String value;
if(! variables.TryGetValue("message", out value) || value == null || value.Trim().Length == 0)
variables["message"] = "Keine Meldung";
if(! variables.TryGetValue("title", out value) || value == null || value.Trim().Length == 0)
variables["title"] = "Kein Titel";
}
Anbei die Einstellungen:
URL: https://api.pushover.net/1/messages.xml
Methode: Post
POST Content Typ: application/x-www-form-urlencoded
Parameter: token=<MEINTOKEN>&user=%address%&title=Alarmierung&priority=1&message=%message%
Skript:
public static bool ProcessResponse(int httpCode, String[] header, String content, out String result) {
if(httpCode == 200) {
result = content;
return true;
} else {
result = content;
return false;
}
}
public static void PrepareVariables(System.Collections.Generic.IDictionary<String, String> variables) {
String value;
if(! variables.TryGetValue("message", out value) || value == null || value.Trim().Length == 0)
variables["message"] = "Keine Meldung";
if(! variables.TryGetValue("title", out value) || value == null || value.Trim().Length == 0)
variables["title"] = "Kein Titel";
}