Interface HttpRequestClient

All Known Implementing Classes:
AbstractHttpRequestClientImpl

public interface HttpRequestClient
Client that actually makes a request
  • Method Details

    • getRequest

      <T> HttpEntityResponse<T> getRequest(Class<T> clazz, String path, HttpRequestProperties properties)
      Performs a GET request and marshals the response to the given type
      Type Parameters:
      T - The type to return
      Parameters:
      clazz - the type to return
      path - the path of the resource. E.g. /rest/api/2/issue/createmeta
      properties - extra request properties to add
      Returns:
      the returned response
    • deleteRequest

      HttpResponse deleteRequest(String path, HttpRequestProperties properties)
      Performs a DELETE request
      Parameters:
      path - the path of the resource. E.g. /rest/api/2/issue/createmeta
      properties - extra request properties to add
      Returns:
      the returned response
    • postRequest

      <T> HttpEntityResponse<T> postRequest(Class<T> clazz, String path, HttpRequestProperties properties, Object body)
      Performs a POST request and marshals the response to the given type
      Type Parameters:
      T - The type to return
      Parameters:
      clazz - the type to return
      path - the path of the resource. E.g. /rest/api/2/issue/createmeta
      properties - extra request properties to add
      body - and object to serialize to JSON and incluse as the body of the post
      Returns:
      the returned response
    • putRequest

      <T> HttpEntityResponse<T> putRequest(Class<T> clazz, String path, HttpRequestProperties properties, Object body)
      Performs a PUT request and marshals the response to the given type
      Type Parameters:
      T - The type to return
      Parameters:
      clazz - the type to return
      path - the path of the resource. E.g. /rest/api/2/issue/createmeta
      properties - extra request properties to add
      body - and object to serialize to JSON and incluse as the body of the post
      Returns:
      the returned response