client-api/src/main/java/com/streamsets/datacollector/client/ApiClient.java
private Client getClient() {
    if(!hostMap.containsKey(basePath)) {
      ClientConfig config = new ClientConfig();
      config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
      Client client = ClientBuilder.newClient(config);
      client.register(new CsrfProtectionFilter("CSRF"));
      hostMap.put(basePath, client);
    }
    return hostMap.get(basePath);
  }
private Client getClient() {
    if(!hostMap.containsKey(basePath)) {
      ClientConfig config = new ClientConfig();
      config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
      Client client = ClientBuilder.newClient(config);
      client.register(new CsrfProtectionFilter("CSRF"));
      hostMap.put(basePath, client);
    }
    return hostMap.get(basePath);
  }
private Client getClient ( ) { if ( ! hostMap . containsKey ( basePath ) ) { ClientConfig config = new ClientConfig ( ) ; config . property ( ClientProperties . SUPPRESS_HTTP_COMPLIANCE_VALIDATION , true ) ; Client client = ClientBuilder . newClient ( config ) ; client . register ( new CsrfProtectionFilter ( "CSRF" ) ) ; hostMap . put ( basePath , client ) ; } return hostMap . get ( basePath ) ; }
Get an existing client or create a new client to handle HTTP request.
Get an existing client or create a new client to handle HTTP request .