Class RestTemplateSpeedyClientImpl
java.lang.Object
com.github.silent.samurai.speedy.api.client.clients.RestTemplateSpeedyClientImpl
- All Implemented Interfaces:
HttpClient<SpeedyResponse>
-
Constructor Summary
ConstructorsConstructorDescriptionRestTemplateSpeedyClientImpl(org.springframework.web.client.RestTemplate restTemplate, String baseUrl) -
Method Summary
Modifier and TypeMethodDescriptioninvokeAPI(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) Invoke an HTTP API call with the given parameters.
-
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 ExceptionDescription copied from interface:HttpClientInvoke an HTTP API call with the given parameters.- Specified by:
invokeAPIin interfaceHttpClient<SpeedyResponse>- Parameters:
path- The sub-path of the HTTP URLmethod- The request methodqueryParams- The query parametersbody- The request body objectheaderParams- The header parameters- Returns:
- ResponseEntity with the response
- Throws:
org.springframework.web.client.RestClientException- if the HTTP call failsException
-