I’m going to be mad …
Spend hours on this function and can’t make it working.
When i have added and then called it from ssh terminal works like a charm!
But when i have added it via script, i just get an on error block (“status”=“failed”) as a result.
:global FUNfetchToAsArr do={
:do {
:log warning message="url=$url";
:log warning message="http-data=$data";
:local res [/tool fetch mode=$POSTMODE url=$url http-method=post http-data="$data" as-value output=user check-certificate=yes-without-crl];
:log warning message="RESULT = $res";
:return $res;
} on-error={
:return ({"status"="failed"});
}
}
May someone help and describe why, when i have edded this function via terminal, it works well (i receive the result of port request), but when it is added from script, i get only :return ({“status”=“failed”});
Futher in script this function is called like that:
:local result [$FUNfetchToAsArr url=$URL data=$postData];