public class AuthenticatedHttpClient extends Object
| Constructor and Description |
|---|
AuthenticatedHttpClient(org.slf4j.Logger logger,
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.BasicCredentials> basicCredentials,
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.CertificateCredentials> certificateCredentials)
Constructs a
AuthenticatedHttpClient. |
AuthenticatedHttpClient(com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.BasicCredentials> basicCredentials,
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.CertificateCredentials> certificateCredentials)
Constructs a
AuthenticatedHttpClient. |
| Modifier and Type | Method and Description |
|---|---|
com.elastisys.scale.commons.net.http.HttpRequestResponse |
execute(org.apache.http.client.methods.HttpUriRequest request)
Sends a HTTP request to a remote endpoint and returns a
HttpRequestResponse object holding the response message status,
body, and headers. |
public AuthenticatedHttpClient(com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.BasicCredentials> basicCredentials,
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.CertificateCredentials> certificateCredentials)
AuthenticatedHttpClient.basicCredentials - Username/password credentials for basic authentication.certificateCredentials - Certificate credentials for certificate-based client
authentication.public AuthenticatedHttpClient(org.slf4j.Logger logger,
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.BasicCredentials> basicCredentials,
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.CertificateCredentials> certificateCredentials)
AuthenticatedHttpClient.logger - The Logger instance to make use of.basicCredentials - Username/password credentials for basic authentication.certificateCredentials - Certificate credentials for certificate-based client
authentication.public com.elastisys.scale.commons.net.http.HttpRequestResponse execute(org.apache.http.client.methods.HttpUriRequest request)
throws IOException
HttpRequestResponse object holding the response message status,
body, and headers.request - The request to send.IOException - If anything went wrong.Copyright © 2011–2014 elastisys. All rights reserved.