spring-framework / org.springframework.web.util / UriUtils / encodePath

encodePath

open static fun encodePath(path: String, encoding: String): String

Encode the given URI path with the given encoding.

Parameters

path - the path to be encoded

encoding - the character encoding to encode to

Exceptions

UnsupportedEncodingException - when the given encoding parameter is not supported

Return
the encoded path

open static fun encodePath(path: String, charset: Charset): String

Encode the given URI path with the given encoding.

Parameters

path - the path to be encoded

charset - the character encoding to encode to

Return
the encoded path

Since
5.0