[solved]HTTPGetRequest using a String containing special printabel characters

Hi,
I’m using a HTTPGetRequest with a string that contains double quotes, comma , “[” and "]"
I can send the complete string when replacing them with the HEX-Version like %22 for double quotes, %2C for comma and %5A and %5C for “[” and “]”. The result is correct.
Now I would like to replace the string-parts between the double-quotes with a variable, however I can’t seem to find a solution. I’m composing the correct String into a String variable, logging it and using it in the HTTPGetRequest. The Request raises an error, although the logged string is working when pasting it into the browser.
This is the Error reported:

java.lang.IllegalArgumentException: Invalid uri 'https://creativecommons.tankerkoenig.de/json/prices.php?ids=["3e563b17-f3fc-4a3d-b486-60d25e5948d5","bc01b1b9-b2b9-4f78-98ef-b7ee8d8a66a4","a53fff71-133c-48b1-84ba-20a9be6ec538"]&apikey=xxxxxx': Invalid query

apikey deleted!

I think you will have to replace the chars with the HEX-Version, so the string is like

https://creativecommons.tankerkoenig.de/json/prices.php?ids=%5A%223e563b17-f3fc-4a3d-b486-60d25e5948d5%22,%22bc01b1b9-b2b9-4f78-98ef-b7ee8d8a66a4%22,%22a53fff71-133c-48b1-84ba-20a9be6ec538%22%5C&apikey=xxxxxx

Yes, that is understood. The string you posted can be used in that format to get a correct response.
What I’m trying is to seperate the ID (the string between the " ") in order to use a String-variable, however it doesn’t work.
The posted error was created when composing the string like:

var String URL="https://creativecommons.tankerkoenig.de/json/prices.php?ids=%5B%22" + Tankstelle1_ID +"%22%2C%22" +Tankstelle2_ID + "%22%2C%22" + Tankstelle3_ID+"22%5D&apikey="+ API_Key
logInfo ("Benzinpreise", "URL = {}", URL)
var String json = sendHttpGetRequest(URL)
logInfo("Benzinpreise","JSON-String = {}", json)

Looking at the Website from “TankerKönig” I found a new syntax for the request without the quotes and brackets.
I got it working with:

var String URL= "https://creativecommons.tankerkoenig.de/json/prices.php?ids=" + Tankstelle1_ID + "\," +Tankstelle2_ID + "\," + Tankstelle3_ID + "&apikey=" + API_Key
    logInfo ("Benzinpreise", "URL = {}", URL)
    var String json = sendHttpGetRequest(URL)
    logInfo("Benzinpreise","JSON-String = {}", json)

So it’s working with an escaped , (,)!