我正在学习如何使用角度使用服务进行http请求,这是我的代码:
export class ApiCallService {
// DECLARATIONS:
tmdb_api_key = '*******'; // personal api key to access the TMDB API
posterBaseAddress = 'https://image.tmdb.org/t/p/w300'; // base
address of the TMDB poster link, to add film specific path
// SEARCH PARAMETERS
requestPages: number; // get the number of pages for the request so is possible to load all the films (request is 1 page at time)
pageToLoad = 1; // number of page to load, start with 1
baseLanguage = 'en-US'; // return …Run Code Online (Sandbox Code Playgroud)