Luup nog working in scene but URL works

I am trying to stop a device witch needs a \ parameter at the end

This code runs the scene
luup.inet.wget(“http://root:pass@192.168.1.101/axis-cgi/io/port.cgi?action=3:/”)

This code is supposed to stop the scene
luup.inet.wget(“http://root:pass@192.168.1.101/axis-cgi/io/port.cgi?action=3:\”)

but the moment i execute it i get the message : failed to test code try again.

If i paste the url in a browser it works, looks like the luup code cant reconize the \

Anyone know how i can get this working ?

Change the single backslash \ to two \. The \ on its own means escape the next character, so you’re swallowing the quote that follows as part of the request, and then leaving an unterminated string, which causes the error.

You could also try changing the single \ to %5c, which is the URL-encoded version of that character.

[quote=“rigpapa, post:2, topic:198874”]Change the single backslash \ to two \. The \ on its own means escape the next character, so you’re swallowing the quote that follows as part of the request, and then leaving an unterminated string, which causes the error.

You could also try changing the single \ to %5c, which is the URL-encoded version of that character.[/quote]
Thank you!

Working perfectly