code: private WebTarget configure(String token, boolean debug, Logger log, int maxLog) {
          Client client = ClientBuilder.newBuilder()
                  .register(MultiPartFeature.class)
                  .register(JsonProcessingFeature.class)
                  .build();
  
          client.register(HttpAuthenticationFeature.basic(token, ""));
          if (debug) client.register(new LoggingFilter(log, maxLog));
  
          return client.target(baseUri);
      }
docs: Configures this client, by settings HTTP AUTH filter, the REST URL and logging.
  
  @param token  its API Token
  @param debug  true for Jersey REQ/RES logging
  @param log    debug log stream (if debug==true)
  @param maxLog max size of logged entity (if debug==true)
  @return configured REST URL target