public class HttpClients
extends java.lang.Object
HttpStreams
. They are
passed into methods such asHttpStreams
Constructor and Description |
---|
HttpClients() |
Modifier and Type | Method and Description |
---|---|
static org.apache.http.impl.client.CloseableHttpClient |
basic(java.lang.String user,
java.lang.String password)
Create a basic authentication HTTP client with a fixed user and password.
|
static org.apache.http.impl.client.CloseableHttpClient |
basic(Supplier<java.lang.String> user,
Supplier<java.lang.String> password)
Method to create a basic authentication HTTP client.
|
static org.apache.http.impl.client.CloseableHttpClient |
noAuthentication()
Create HTTP client with no authentication.
|
public static org.apache.http.impl.client.CloseableHttpClient noAuthentication()
HttpStreams
public static org.apache.http.impl.client.CloseableHttpClient basic(java.lang.String user, java.lang.String password)
user
- User for authenticationpassword
- Password for authenticationHttpStreams
public static org.apache.http.impl.client.CloseableHttpClient basic(Supplier<java.lang.String> user, Supplier<java.lang.String> password)
user
and password
are called
when this method is invoked to obtain the user and password
and runtime.user
- Function that provides user for authenticationpassword
- Function that provides password for authenticationHttpStreams
Copyright IBM 2015,2016 - 2f6ad0e-20160307-0902