Interface CustomHttpClient
-
- All Known Implementing Classes:
NativeHttpClient
public interface CustomHttpClientHTTP client abstraction for making API requests.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Tpost(String url, String requestBody, Class<T> responseType)Executes HTTP POST request with JSON body.<T> Tput(String url, String requestBody, Class<T> responseType)Executes HTTP PUT request with JSON body.
-
-
-
Method Detail
-
post
<T> T post(String url, String requestBody, Class<T> responseType) throws IOException
Executes HTTP POST request with JSON body.- Type Parameters:
T- response type- Parameters:
url- target URLrequestBody- JSON request bodyresponseType- expected response type class- Returns:
- deserialized response object or null if no response expected
- Throws:
IOException- if request fails or response cannot be processed
-
put
<T> T put(String url, String requestBody, Class<T> responseType) throws IOException
Executes HTTP PUT request with JSON body.- Type Parameters:
T- response type- Parameters:
url- target URLrequestBody- JSON request bodyresponseType- expected response type class- Returns:
- deserialized response object or null if no response expected
- Throws:
IOException- if request fails or response cannot be processed
-
-