ui/src/main/java/ucar/nc2/util/net/HttpClientManager.java
static public void init(CredentialsProvider provider, String userAgent)
  {
    if (provider != null)
        try {
            HTTPSession.setGlobalCredentialsProvider(provider);
        } catch (HTTPException e) {
            throw new IllegalArgumentException(e);
        }
    if (userAgent != null)
      HTTPSession.setGlobalUserAgent(userAgent + "/NetcdfJava/HttpClient");
    else
      HTTPSession.setGlobalUserAgent("NetcdfJava/HttpClient");

  }
static public void init(CredentialsProvider provider, String userAgent)
  {
    if (provider != null)
        try {
            HTTPSession.setGlobalCredentialsProvider(provider);
        } catch (HTTPException e) {
            throw new IllegalArgumentException(e);
        }
    if (userAgent != null)
      HTTPSession.setGlobalUserAgent(userAgent + "/NetcdfJava/HttpClient");
    else
      HTTPSession.setGlobalUserAgent("NetcdfJava/HttpClient");

  }
static public void init ( CredentialsProvider provider , String userAgent ) { if ( provider != null ) try { HTTPSession . setGlobalCredentialsProvider ( provider ) ; } catch ( HTTPException e ) { throw new IllegalArgumentException ( e ) ; } if ( userAgent != null ) HTTPSession . setGlobalUserAgent ( userAgent + "/NetcdfJava/HttpClient" ) ; else HTTPSession . setGlobalUserAgent ( "NetcdfJava/HttpClient" ) ; }
initialize the HttpClient layer.

@param provider  CredentialsProvider.
@param userAgent Content of User-Agent header, may be null
initialize the HttpClient layer .