private URI buildHttpUri(final String url, final Map<String, String> parameters) {
        return FunctionUtils.doUnchecked(() -> {
            val uriBuilder = new URIBuilder(url);
            parameters.forEach(uriBuilder::addParameter);
            return uriBuilder.build();
        });
    }
Prepare http request. Tries to set the authorization header
in cases where the URL endpoint does not actually produce the header
on its own.

@param request   the request
@param execution the execution request
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/http/HttpUtils.java