java.lang.illegalargumentexception: invalid character found in the request target. the valid characters are defined in rfc 7230 and rfc 3986
If you use an upper version of Tomcat 8.5 it throws this exception if the URL path contains '[' and ']'. For older versions, it works.
Please use encodeUrl before making the requests.