Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uri.getQueryParameters() method converting "+" Character with space

Problem is like uri.getQueryParameters() method is converting Character(+) into space which I am trying to avoid. Below is the uri before

"http://localhost:8081/service/linear/test/?id=test+QYY"

after uri.getQueryParameters() will remove the + and it will replace with space so the id now doesn't contains the + instead it contains the space as below

"http://localhost:8081/service/linear/test/?id=test QYY"

Notes - uri is a object of UriInfo which is defined by package javax.ws.rs.core

like image 843
user3622577 Avatar asked Oct 27 '25 15:10

user3622577


1 Answers

I know is a little late, but I found out in the same situation and I realized that the getQueryParameters is working right instead of getQueryParameter. In my case the char "+" in the Uri with the getQueryParameter let an empty space, and with the getQueryParameters works fine.

like image 141
Diego Alarcon Avatar answered Oct 29 '25 04:10

Diego Alarcon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!