Package com.codebarrel.tenant.api.http
Interface HttpRequestClient
- All Known Implementing Classes:
AbstractHttpRequestClientImpl
public interface HttpRequestClient
Client that actually makes a request
-
Method Summary
Modifier and TypeMethodDescriptiondeleteRequest(String path, HttpRequestProperties properties) Performs a DELETE request<T> HttpEntityResponse<T> getRequest(Class<T> clazz, String path, HttpRequestProperties properties) Performs a GET request and marshals the response to the given type<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<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
-
Method Details
-
getRequest
Performs a GET request and marshals the response to the given type- Type Parameters:
T- The type to return- Parameters:
clazz- the type to returnpath- the path of the resource. E.g. /rest/api/2/issue/createmetaproperties- extra request properties to add- Returns:
- the returned response
-
deleteRequest
Performs a DELETE request- Parameters:
path- the path of the resource. E.g. /rest/api/2/issue/createmetaproperties- 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 returnpath- the path of the resource. E.g. /rest/api/2/issue/createmetaproperties- extra request properties to addbody- 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 returnpath- the path of the resource. E.g. /rest/api/2/issue/createmetaproperties- extra request properties to addbody- and object to serialize to JSON and incluse as the body of the post- Returns:
- the returned response
-