Interface TmdbHttpClient

All Known Implementing Classes:
JavaNetTmdbHttpClient

public interface TmdbHttpClient
Abstraction for executing HTTP requests against the TMDB API.

This interface is used by SDK services to perform requests without depending directly on a specific HTTP client implementation. The default implementation is based on Java's built-in HTTP client.

  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    get(TmdbRequest request, Class<T> responseType)
    Sends a GET request and maps the response body to the given Java type.
  • Method Details

    • get

      <T> T get(TmdbRequest request, Class<T> responseType)
      Sends a GET request and maps the response body to the given Java type.
      Type Parameters:
      T - the expected response type
      Parameters:
      request - the TMDB request to execute
      responseType - the expected response type
      Returns:
      the mapped response body
      Throws:
      NullPointerException - if request or responseType is null
      TmdbException - if the request fails, TMDB returns a non-successful response, or the response body cannot be mapped