code: public static Request configure(Config config, Request request) {
          String apiVersion = config.apiVersion();
          Endpoint endpoint = Endpoint.byHost.get(request.url().host());
          if (endpoint == null) {
              throw new UnsupportedOperationException("unknown endpoint: " + request.url().host());
          }
  
          String key = endpoint.authenticationKey(config);
          Request.Builder builder = request.newBuilder()
                  .addHeader("User-Agent", config.userAgent())
                  .addHeader("Authorization", Credentials.basic(key, "x"));
  
          if (apiVersion != null && !apiVersion.isEmpty()) {
              builder = builder.addHeader("Omise-Version", apiVersion);
          }
  
          return builder.build();
      }
docs: Configures a {@link Request} according to the given {@link Config}.
  
  @param config  A {@link Config} to use for configuration.
  @param request An HTTP {@link Request} to configure.
  @return A new {@link Request} instance with configurations from {@link Config} applied.