Interface CustomHttpClient

  • All Known Implementing Classes:
    NativeHttpClient

    public interface CustomHttpClient
    HTTP client abstraction for making API requests.
    • 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 URL
        requestBody - JSON request body
        responseType - 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 URL
        requestBody - JSON request body
        responseType - expected response type class
        Returns:
        deserialized response object or null if no response expected
        Throws:
        IOException - if request fails or response cannot be processed