var responseEntity =
webClient
.get()
.uri(
uriBuilder ->
uriBuilder
.path("myendpoint")
.queryParam("email", email)
.build())
.retrieve()
The problem with this code is that if the email here is like my+email@gmail.com, the URI default encoding doesn't encode + in the queryParam, and if I myself encode the string to Proper Uri encoded string: like: my%2Bemail@gmail.com, in this case, URI default encoder here will encode the % symbol as well. Now, if I use the .encode() function of uriBuilder, it would also encode @ in the email.
I want to achieve URI like: https://myendpoint?email=my%2Bemail@gmail.com
Can somebody please help with this? Thanks a lot.