Class HttpClient
- java.lang.Object
-
- io.jenkins.plugins.google.analyze.code.security.client.HttpClient
-
public class HttpClient extends Object
HttpClient provides Client Object for Http Based communication.
-
-
Field Summary
Fields Modifier and Type Field Description static List<Integer>
RETRIABLE_ERROR_CODES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.client.methods.HttpGet
buildGETRequest(String url, String accessToken)
Builds GET Request Client.org.apache.http.client.methods.HttpPost
buildPOSTRequest(String url, String jsonReq, String accessToken)
Build POST Request Client.org.apache.http.impl.client.HttpClientBuilder
getHttpClientBuilder(Integer maxRetryCount)
Returns HttpClientBuilder instance.static HttpClient
getInstance()
Returns an instance ofHttpClient
-
-
-
Method Detail
-
getInstance
public static HttpClient getInstance()
Returns an instance ofHttpClient
-
getHttpClientBuilder
public org.apache.http.impl.client.HttpClientBuilder getHttpClientBuilder(Integer maxRetryCount)
Returns HttpClientBuilder instance.- Parameters:
maxRetryCount
- maximum count of retries
-
buildPOSTRequest
public org.apache.http.client.methods.HttpPost buildPOSTRequest(String url, String jsonReq, String accessToken)
Build POST Request Client.- Parameters:
url
- http url that should be accessed.jsonReq
- request payload.accessToken
- OAuth access token.
-
-