I have RouterOS 7.1.3 and want to use /tool fetch to to HTTP POST upload of .rsc file to destination HTTP server.
because, i have multiple routers in multiple locations, and i want to do schedule script to create and send backup.I have RouterOS 7.1.3 and want to use /tool fetch to to HTTP POST upload of .rsc file to destination HTTP server.
Again I ask, why must it be HTTP POST? Why can't it be the remote server doing HTTP GET on files stored on the router's flash? Why can't it be scp from the same direction? If it has to be done from the RouterOS side, then why can't it be "/fetch mode=ftp upload..."?
i want to do schedule script to create and send backup.
some routers are behind NAT
no FTP
nor SSH/SCP in my case.
:global $data "test";
:global $url "https://prod-51.westeurope.logic.azure.com:443/workflows/blabla/triggers/manual/paths/invoke....";
/tool fetch mode=https http-method=put http-data=$data url=$url
{
"headers": {
"User-Agent": "Mikrotik/7.x,Fetch",
"Content-Type": "application/x-www-form-urlencoded"
},
"body": {
"$content-type": "application/x-www-form-urlencoded",
"$content": "dGVzdA==",
"$formdata": [
{
"key": "test",
"value": ""
}
]
}
}
/export file=export.rsc
:global data [/file get [/file find name=export.rsc] contents];
If you dont know the answer, stop posting, stop telling him its a dumb approach. its not.
@tangent, It's almost like spam on this topic. It's always "+1 for HTTP file upload", but it's like no one talk where they were sending since what type of upload it support matters too.Now go find me that magic wand.If you dont know the answer, stop posting, stop telling him its a dumb approach. its not.