/tool fetch: invalid URL protocol

Hi,

i’m writing a short script to update some dynamic ip adresses and run in a problem with the /tool fetch command.

/tool fetch url="dyndns.kasserver.com" user="USER" password="PASSWORD mode=https keep-result=no

This command produces everytime the error “invlaid URL protocol”. I do not have a clue why. It should work.
ROS version 6.33.3

Any idea?

You need to either have “url” include the protocol and path in it (and possibly the username and password), or use “address” instead of “url” to specify the domain name (and possibly include “host” too, if you want to ensure the web server knows the domain name you’re requesting it with), and also use src-path to specify the path on the host.

i.e. either

/tool fetch mode=https user="USER" password="PASSWORD" address="dyndns.kasserver.com" host="dyndns.kasserver.com" src-path="/" keep-result=no

or

/tool fetch url="https://USER:PASSWORD@dyndns.kasserver.com/" keep-result=no

(I personally prefer the second option)

Wow :open_mouth:

It works :smiley: Thank you very much!

Ok. Get it now working with IPv4 and IPv6.
Maybe someone can profit from my headache :wink:

DDNS provider: all-inkl.com

Fetch code for IPv4 (this part is a variation. It can be done like IPv6 as well)

:local url "https://DDNSUSER:DDNSPASS@dyndns.kasserver.com//?myip=IPv4ADDRESS"
/tool fetch url="$url" keep-result=no

Fetch code for IPv6. It is the only working solution, that i found. It will not work with “url=…”

:local url "dyndns.kasserver.com"
/tool fetch address="$url" host="$url" mode=https user="DDNSUSER" pass="DDNSPASS" src-path="\?myip=IPv6ADDRESS" keep-result=no

My complete script is very messy at this time. Maybe i will post it here when i get the time to do it right and make it useful for everyone.