public class HttpProxy extends Object
HttpClientConf.proxy(HttpProxy)
.
This class is a simple data structure for proxy address and authentication.
Constructor and Description |
---|
HttpProxy(TcpAddress address,
Supplier<Async<UserPass>> userPassSupplier)
Create an HttpProxy.
|
HttpProxy(String host,
int port,
String username,
String password)
Create an HttpProxy.
|
HttpProxy(String host,
int port)
Create an HttpProxy.
|
Instance Methods | |
---|---|
TcpAddress |
address()
The proxy address.
|
Supplier<Async<UserPass>> |
userPassSupplier()
The username/password supplier for proxy authentication.
|
public HttpProxy(TcpAddress address, Supplier<Async<UserPass>> userPassSupplier)
If userPassSupplier!=null, Basic/Digest authentications are supported by HttpClient for proxy authentication.
public HttpProxy(String host, int port, String username, String password)
This is a convenience method for
HttpProxy(address, userPassSupplier)
with address.ssl=false.
public HttpProxy(String host, int port)
This is a convenience method for
HttpProxy(address, userPassSupplier)
with address.ssl=false, userPassSupplier=null.
public TcpAddress address()