Class HttpClient
- java.lang.Object
-
- in.ashwanthkumar.gocd.client.http.HttpClient
-
public class HttpClient extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpClient(Authentication authentication, String serverHost)HttpClient(Authentication authentication, Proxy proxy, int socketTimeout, int readTimeout, String serverHost)HttpClient(String username, String password, String serverHost)Deprecated, for removal: This API element is subject to removal in a future version.HttpClient(String username, String password, Proxy proxy, int socketTimeout, int readTimeout, String serverHost)Deprecated, for removal: This API element is subject to removal in a future version.HttpClient(String username, String password, Proxy proxy, String serverHost)Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetAs(String resource, Class<T> type)<T> TgetAs(String resource, Class<T> type, int apiVersion)<T> TgetAs(String resource, Type dataType)<T> TgetAs(String resource, Type type, int apiVersion)com.google.gson.JsonElementgetRawJson(String resource)com.google.gson.JsonElementgetRawJson(String resource, int apiVersion)StringgetXML(String resource)com.google.api.client.http.HttpRequestinvokeGET(String resource)com.google.api.client.http.HttpRequestinvokeGET(String resource, int apiVersion)voidsetMockResponse(String response)
-
-
-
Constructor Detail
-
HttpClient
@Deprecated(since="0.0.8", forRemoval=true) public HttpClient(String username, String password, Proxy proxy, String serverHost)
Deprecated, for removal: This API element is subject to removal in a future version.
-
HttpClient
@Deprecated(since="0.0.8", forRemoval=true) public HttpClient(String username, String password, String serverHost)
Deprecated, for removal: This API element is subject to removal in a future version.
-
HttpClient
@Deprecated(since="0.0.8", forRemoval=true) public HttpClient(String username, String password, Proxy proxy, int socketTimeout, int readTimeout, String serverHost)
Deprecated, for removal: This API element is subject to removal in a future version.
-
HttpClient
public HttpClient(Authentication authentication, String serverHost)
-
HttpClient
public HttpClient(Authentication authentication, Proxy proxy, int socketTimeout, int readTimeout, String serverHost)
-
-
Method Detail
-
setMockResponse
public void setMockResponse(String response)
-
getRawJson
public com.google.gson.JsonElement getRawJson(String resource) throws IOException
- Throws:
IOException
-
getRawJson
public com.google.gson.JsonElement getRawJson(String resource, int apiVersion) throws IOException
- Throws:
IOException
-
getAs
public <T> T getAs(String resource, Class<T> type) throws IOException
- Throws:
IOException
-
getAs
public <T> T getAs(String resource, Type dataType) throws IOException
- Throws:
IOException
-
getAs
public <T> T getAs(String resource, Class<T> type, int apiVersion) throws IOException
- Throws:
IOException
-
getAs
public <T> T getAs(String resource, Type type, int apiVersion) throws IOException
- Throws:
IOException
-
getXML
public String getXML(String resource) throws IOException
- Throws:
IOException
-
invokeGET
public com.google.api.client.http.HttpRequest invokeGET(String resource) throws IOException
- Throws:
IOException
-
invokeGET
public com.google.api.client.http.HttpRequest invokeGET(String resource, int apiVersion) throws IOException
- Throws:
IOException
-
-