Package com.codebarrel.tenant.api.http
Class AbstractHttpRequestClientImpl
java.lang.Object
com.codebarrel.tenant.api.http.AbstractHttpRequestClientImpl
- All Implemented Interfaces:
HttpRequestClient
-
Constructor Summary
Constructors -
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 typeprotected abstract String<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
-
Constructor Details
-
AbstractHttpRequestClientImpl
-
-
Method Details
-
getRequest
public <T> HttpEntityResponse<T> getRequest(Class<T> clazz, String path, HttpRequestProperties properties) Description copied from interface:HttpRequestClientPerforms a GET request and marshals the response to the given type- Specified by:
getRequestin interfaceHttpRequestClient- 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
Description copied from interface:HttpRequestClientPerforms a DELETE request- Specified by:
deleteRequestin interfaceHttpRequestClient- Parameters:
path- the path of the resource. E.g. /rest/api/2/issue/createmetaproperties- extra request properties to add- Returns:
- the returned response
-
postRequest
public <T> HttpEntityResponse<T> postRequest(Class<T> clazz, String path, HttpRequestProperties properties, Object body) Description copied from interface:HttpRequestClientPerforms a POST request and marshals the response to the given type- Specified by:
postRequestin interfaceHttpRequestClient- 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
public <T> HttpEntityResponse<T> putRequest(Class<T> clazz, String path, HttpRequestProperties properties, Object body) Description copied from interface:HttpRequestClientPerforms a PUT request and marshals the response to the given type- Specified by:
putRequestin interfaceHttpRequestClient- 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
-
getUrl
-
getAdditionalHeaders
-