Interface HttpClient<T>
- All Known Implementing Classes:
MockMvcHttpClient,RestTemplateSpeedyClientImpl
public interface HttpClient<T>
Interface for HTTP client operations used by SpeedyApi.
This allows users to plug in their own HTTP client implementation.
-
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.
-
Method Details
-
invokeAPI
T 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 org.springframework.web.client.RestClientException, com.fasterxml.jackson.core.JsonProcessingException, ExceptionInvoke an HTTP API call with the given parameters.- 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 failscom.fasterxml.jackson.core.JsonProcessingExceptionException
-