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
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: