Class CodeDxRepeatingClient


  • public class CodeDxRepeatingClient
    extends CodeDxClient
    Created by samuelj on 3/27/15.
    • Method Detail

      • doHttpRequest

        protected <T> T doHttpRequest​(org.apache.http.client.methods.HttpRequestBase request,
                                      String path,
                                      boolean isXApi,
                                      Type responseType,
                                      Object requestBody)
                               throws IOException,
                                      CodeDxClientException
        Description copied from class: CodeDxClient
        Perform an HttpRequest to the given api path, with an optional request body, and parse the response
        Overrides:
        doHttpRequest in class CodeDxClient
        Type Parameters:
        T - Type parameter that determines the parsed response type
        Parameters:
        request - Generally a new `HttpGet`, `HttpPost`, or `HttpPut`
        path - The relative API path (not including /x/ or /api/)
        isXApi - Flag that determines whether the request will prepend /x/ or /api/ to the path (true = /x/)
        responseType - A type instance that helps `gson` parse the response body
        requestBody - An optional payload that will be converted to json and sent with the request
        Returns:
        The parsed response
        Throws:
        IOException - If the underlying IO goes wrong
        CodeDxClientException - For non 2xx response codes