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

encodeAuthority

open static fun encodeAuthority(authority: String, encoding: String): String

Encode the given URI authority with the given encoding.

Parameters

authority - the authority to be encoded

encoding - the character encoding to encode to

Exceptions

UnsupportedEncodingException - when the given encoding parameter is not supported

Return
the encoded authority

open static fun encodeAuthority(authority: String, charset: Charset): String

Encode the given URI authority with the given encoding.

Parameters

authority - the authority to be encoded

charset - the character encoding to encode to

Return
the encoded authority

Since
5.0