Package dev.reuss.tmdb.core.http
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 TypeMethodDescription<T> Tget(TmdbRequest request, Class<T> responseType) Sends a GET request and maps the response body to the given Java type.
-
Method Details
-
get
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 executeresponseType- the expected response type- Returns:
- the mapped response body
- Throws:
NullPointerException- ifrequestorresponseTypeisnullTmdbException- if the request fails, TMDB returns a non-successful response, or the response body cannot be mapped
-