private static void addHeadersToRequest(HttpHeaders headers, Request req) {
        if (headers != null) {
            String credentialAuthorization = headers.getHeaderString(HttpHeaders.AUTHORIZATION);
            if (credentialAuthorization != null) {
                req.header(HttpHeaders.AUTHORIZATION, credentialAuthorization);
            }
        }
    }
Extract headers from REST call and add to client request
@param headers         Headers from REST endpoint
@param req             The client request to modify
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java