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 Type
    Method
    Description
    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)
    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, Exception
      Invoke an HTTP API call with the given parameters.
      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
      com.fasterxml.jackson.core.JsonProcessingException
      Exception