Hello. I would like to use urlfetch with a URL that is contained inside a variable. How can I achieve it?
This code works (returning the desired information from the website)
!commands edit !test $(eval ‘$(urlfetch http://test.com)’)
This one doesn’t (returning “Right-hand side of ‘instanceof’ is not an object” error message)
!commands edit !test $(eval const my_url = ‘http://test.com’; ‘$(urlfetch my_url)’)
By the way, I’m using eval because the actual !test command will contain more code, but the relevant problem is this one, trying to use a variable with urlfetch.
Thanks for your help!