Further actions for trigger url action

This commit is contained in:
2026-02-27 22:46:31 +01:00
parent 549c4f109e
commit 6f1f112d98
2 changed files with 15 additions and 4 deletions

View File

@@ -730,7 +730,7 @@ public class Action
if(parameters.length >= 3)
{
urlUsername = parameters[1];
urlPassword = parameters[2];
urlPassword = parameters[2];
if(parameters.length >= 4)
method = parameters[3];
@@ -739,11 +739,22 @@ public class Action
{
// has params
String[] paramPairs = parameters[4].split(Action.actionParameters2SeparatorOuter);
String value = "";
for(String pair : paramPairs)
{
String[] pieces = pair.split(Action.actionParameters2SeparatorInner);
if(pieces.length == 2)
httpParams.put(pieces[0], pieces[1]);
try
{
value = Miscellaneous.replaceVariablesInText(pieces[1], Miscellaneous.getAnyContext());
}
catch (Exception e)
{
value = "error";
}
if(pieces.length == 2)
httpParams.put(pieces[0], value);
}
}
}

View File

@@ -310,7 +310,7 @@ public class Miscellaneous extends Service
}
catch(Exception e)
{
Miscellaneous.logEvent("e", "HTTP error", Log.getStackTraceString(e), 3);
Miscellaneous.logEvent("e", "HTTP error", Log.getStackTraceString(e), 3);
return http_error_string;
}
// finally