Class NativeHttpClient
- java.lang.Object
-
- com.testomatio.reporter.client.http.NativeHttpClient
-
- All Implemented Interfaces:
CustomHttpClient
public class NativeHttpClient extends Object implements CustomHttpClient
-
-
Constructor Summary
Constructors Constructor Description NativeHttpClient()
-
Method Summary
All Methods Instance Methods Concrete 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
public <T> T post(String url, String requestBody, Class<T> responseType)
Description copied from interface:CustomHttpClientExecutes HTTP POST request with JSON body.- Specified by:
postin interfaceCustomHttpClient- 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
-
put
public <T> T put(String url, String requestBody, Class<T> responseType)
Description copied from interface:CustomHttpClientExecutes HTTP PUT request with JSON body.- Specified by:
putin interfaceCustomHttpClient- 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
-
-