Class RestTemplateSpeedyClientImpl

java.lang.Object
com.github.silent.samurai.speedy.api.client.clients.RestTemplateSpeedyClientImpl
All Implemented Interfaces:
HttpClient<SpeedyResponse>

public class RestTemplateSpeedyClientImpl extends Object implements HttpClient<SpeedyResponse>
  • Constructor Details

    • RestTemplateSpeedyClientImpl

      public RestTemplateSpeedyClientImpl(org.springframework.web.client.RestTemplate restTemplate, String baseUrl)
  • Method Details

    • invokeAPI

      public SpeedyResponse invokeAPI(String path, org.springframework.http.HttpMethod method, org.springframework.util.MultiValueMap<String,String> queryParams, com.fasterxml.jackson.databind.JsonNode body, org.springframework.http.HttpHeaders headerParams) throws Exception
      Description copied from interface: HttpClient
      Invoke an HTTP API call with the given parameters.
      Specified by:
      invokeAPI in interface HttpClient<SpeedyResponse>
      Parameters:
      path - The sub-path of the HTTP URL
      method - The request method
      queryParams - The query parameters
      body - The request body object
      headerParams - The header parameters
      Returns:
      ResponseEntity with the response
      Throws:
      org.springframework.web.client.RestClientException - if the HTTP call fails
      Exception