set token [::http::geturl http://api.tvmaze.com/shows/$shownumber?embed[]=nextepisode&embed[]=previousepisode -timeout 4000]
when i open this url in my browser everything is fine, but the eggdrop seems to have a problem with those brackets. Because saving the output to file will result in outputting the previous episode only. Im guessing this has something to do with those []. Anyone has an idea how to solve that?
thanks for helping
Last edited by Elfriede on Thu Oct 20, 2016 3:50 pm, edited 1 time in total.
[] are used for command substitutions, and will cause issues with your code. Further, http URI's can't contain literal [], so you'll have to use %-substitutions; replace [ with %91, and ] with %93
Edit:
Accidentally wrote the decimal values as opposed to the hexadecimal ones;
"[" => "%5b"
"]" => "%5d"
That said, using ::http::formatQuery is indeed a better approach, as suggested by OP
Last edited by nml375 on Thu Oct 20, 2016 5:25 pm, edited 1 time in total.