Closed sunnychuchu closed 3 years ago
need move upper for $CFurl is requried define for 1st run ################# Build CF API Url (v4) ################# :local CFurl "https://api.cloudflare.com/client/v4/zones/" :set CFurl ($CFurl . "$CFzoneid/dns_records/$CFid");
for command line debug mode
recommend rewrite for testing in command :log info ("CF: Command = \"/tool fetch http-method=put mode=https url=\"$CFurl\" http-header-field=\"Authorization:Bearer $CFtkn,content-type:application/json\" output=none http-data=\"{\\"type\\":\\"$CFrecordType\\",\\"name\\":\\"$CFdomain\\",\\"ttl\\":$CFrecordTTL,\\"content\\":\\"$WANip\\"}\"") };
Hy, sorry for the late response i was busy with work a lot. Thank you kindly for your input. I greatly appreciate it :)
Would you like to add a pull request to my repo or should I make the changes?
need move upper for $CFurl is requried define for 1st run ################# Build CF API Url (v4) ################# :local CFurl "https://api.cloudflare.com/client/v4/zones/" :set CFurl ($CFurl . "$CFzoneid/dns_records/$CFid");
for command line debug mode
:log info ("CF: Command = \"/tool fetch http-method=put mode=https url=\"$CFurl\" http-header-field="Authorization:Bearer $CFtkn,content-type:application/json" output=none http-data=\"{\"type\":\"$CFrecordType\",\"name\":\"$CFdomain\",\"ttl\":$CFrecordTTL,\"content\":\"$WANip\"}\"")
recommend rewrite for testing in command :log info ("CF: Command = \"/tool fetch http-method=put mode=https url=\"$CFurl\" http-header-field=\"Authorization:Bearer $CFtkn,content-type:application/json\" output=none http-data=\"{\\"type\\":\\"$CFrecordType\\",\\"name\\":\\"$CFdomain\\",\\"ttl\\":$CFrecordTTL,\\"content\\":\\"$WANip\\"}\"") };