Further actions for trigger url action
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user