How to quote encoding in Java?

How to do percent encoding of a string as described in RFC 3986 ? That is, I do not want (IMO, strange) www-url-form-encoded, how different .

If that matters, I encode data that is not necessarily an integer URL.

+5
source share
1 answer

As you have already determined, standard libraries do not cope very well with this problem.

Try to use either Guava PercentEscaper , or directly one of the escapers depending on the part of the URL that you are trying to encode.

+4
source

Source: https://habr.com/ru/post/1208004/


All Articles