Affects: spring-web 5.2.13.RELEASE


I have a problem about use RestTemplate. When i send a get request to prometheus, i get bad request, but the url is work with http client. The url is http://xxxxx:xxx/api/v1/query_range?query=sum%20(rate%20(container_cpu_usage_seconds_total%7Bpod%3D~%22filebrowser-helm-7d87bc5d4-9hsxb%22%2Cnamespace%3D~%22default%22%7D%5B2m%5D))&start=1669687066.653&end=1669690666.653&step=14&_=1669627794025 The error msg is org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: [{"status":"error","errorType":"bad_data","error":"1:7: parse error: unexpected \"(\""}]

Maybe i think the error is caused by parentheses that is contained in url.

Comment From: bclozel

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.