下载文件/POST请求
/tool fetch url="http://www.mikrotik.com/img/netaddresses2.pdf" mode=http
带返回值
{
:local result [/tool fetch url=http://10.0.0.1/disable_ether2.php as-value output=user];
:if ($result->"status" = "finished") do={
:if ($result->"data" = "0") do={
/interface ethernet set ether2 disabled=yes;
} else={
/interface ethernet set ether2 disabled=no;
}
}
}
POST请求
:local PostData1 ("login_token=".$DdnsToken."&format=json&domain=".$DdnsDomain."&sub_domain=".$DdnsRecord."&record_type=A&offset=0&length=1");
/tool fetch http-method=post http-data=$PostData1 url="https://dnsapi.cn/Record.List" as-value output=user
That is a good tip particularly to those fresh to the blogosphere. Brief but very precise info… Many thanks for sharing this one. A must read post!