Package com.dtolabs.rundeck.core.http
Class ApacheHttpClient
- java.lang.Object
-
- com.dtolabs.rundeck.core.http.ApacheHttpClient
-
- All Implemented Interfaces:
HttpClient<org.apache.http.HttpResponse>
public class ApacheHttpClient extends java.lang.Object implements HttpClient<org.apache.http.HttpResponse>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.dtolabs.rundeck.core.http.HttpClient
HttpClient.Method
-
-
Constructor Summary
Constructors Constructor Description ApacheHttpClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpClient<org.apache.http.HttpResponse>
addHeader(java.lang.String name, java.lang.String value)
HttpClient<org.apache.http.HttpResponse>
addPayload(java.lang.String contentType, java.lang.String payload)
void
execute(RequestProcessor<org.apache.http.HttpResponse> processor)
HttpClient<org.apache.http.HttpResponse>
setBasicAuthCredentials(java.lang.String username, java.lang.String password)
HttpClient<org.apache.http.HttpResponse>
setFollowRedirects(boolean redirects)
HttpClient<org.apache.http.HttpResponse>
setMethod(HttpClient.Method method)
HttpClient<org.apache.http.HttpResponse>
setRetryCount(int count)
HttpClient<org.apache.http.HttpResponse>
setTimeout(int timeoutMs)
HttpClient<org.apache.http.HttpResponse>
setUri(java.net.URI uri)
-
-
-
Method Detail
-
setUri
public HttpClient<org.apache.http.HttpResponse> setUri(java.net.URI uri)
- Specified by:
setUri
in interfaceHttpClient<org.apache.http.HttpResponse>
-
setFollowRedirects
public HttpClient<org.apache.http.HttpResponse> setFollowRedirects(boolean redirects)
- Specified by:
setFollowRedirects
in interfaceHttpClient<org.apache.http.HttpResponse>
-
setBasicAuthCredentials
public HttpClient<org.apache.http.HttpResponse> setBasicAuthCredentials(java.lang.String username, java.lang.String password)
- Specified by:
setBasicAuthCredentials
in interfaceHttpClient<org.apache.http.HttpResponse>
-
setTimeout
public HttpClient<org.apache.http.HttpResponse> setTimeout(int timeoutMs)
- Specified by:
setTimeout
in interfaceHttpClient<org.apache.http.HttpResponse>
-
setMethod
public HttpClient<org.apache.http.HttpResponse> setMethod(HttpClient.Method method)
- Specified by:
setMethod
in interfaceHttpClient<org.apache.http.HttpResponse>
-
setRetryCount
public HttpClient<org.apache.http.HttpResponse> setRetryCount(int count)
- Specified by:
setRetryCount
in interfaceHttpClient<org.apache.http.HttpResponse>
-
addHeader
public HttpClient<org.apache.http.HttpResponse> addHeader(java.lang.String name, java.lang.String value)
- Specified by:
addHeader
in interfaceHttpClient<org.apache.http.HttpResponse>
-
addPayload
public HttpClient<org.apache.http.HttpResponse> addPayload(java.lang.String contentType, java.lang.String payload)
- Specified by:
addPayload
in interfaceHttpClient<org.apache.http.HttpResponse>
-
execute
public void execute(RequestProcessor<org.apache.http.HttpResponse> processor) throws java.lang.Exception
- Specified by:
execute
in interfaceHttpClient<org.apache.http.HttpResponse>
- Throws:
java.lang.Exception
-
-