protected String formatOutputMessageInternal(final String message) {
        try {
            return URLEncoder.encode(message, StandardCharsets.UTF_8);
        } catch (final Exception e) {
            val msg = String.format("Unable to encode URL %s", message);
            LOGGER.warn(msg, e);
        }
        return message;
    }
Encodes the message in UTF-8 format in preparation to send.

@param message Message to format and encode
@return The encoded message.
api/cas-server-core-api-web/src/main/java/org/apereo/cas/web/HttpMessage.java