I need to encode only parameters of the string url. my string url is like: http://127.0.0.1:8070/app/api/fetchData?channel=abc¶m=status:new|addr:null|roomId:Default&group=iPh&reqtype=p1&serialNo=123890&codeId=A1_8uh&type=p
I want to encode value of param(key).I am working on spring boot project. Please suggest some solution.
If you're making the request from Java, you can encode a string using base64 like this[1]:
I guess my first thought would be to encode the parameters that you want this way and then concatenate the whole thing together. What value are you trying to get out of encoding the parameters?
[1] https://www.baeldung.com/java-base64-encode-and-decode