code: private static void prepareHttpRequest(final HttpUriRequest request, final String basicAuthUsername,
                                             final String basicAuthPassword, final Map<String, Object> parameters) {
          if (StringUtils.isNotBlank(basicAuthUsername) && StringUtils.isNotBlank(basicAuthPassword)) {
              val auth = EncodingUtils.encodeBase64(basicAuthUsername + ':' + basicAuthPassword);
              request.setHeader(HttpHeaders.AUTHORIZATION, "Basic " + auth);
          }
      }
docs: 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 basicAuthUsername the basic auth username
  @param basicAuthPassword the basic auth password
  @param parameters        the parameters