Angular API上的JSONP调用方法在本地而不是部署上工作

Angular API上的JSONP调用方法在本地而不是部署上工作,angular,typescript,xmlhttprequest,jsonp,angular-httpclient,Angular,Typescript,Xmlhttprequest,Jsonp,Angular Httpclient,我用的是哪一种 在我的服务中,我使用JSONP模块 getList(input) { const url = 'https://api.themoviedb.org/3/search/movie/?api_key=b6dba21fefcead0c857d43&callback=JSONP_CALLBACK&query=' + input; return this.jsonp.request(url, { method: 'Get' }); } 在组件中,我订阅了它,它正

我用的是哪一种

在我的服务中,我使用JSONP模块

getList(input) {
  const url = 'https://api.themoviedb.org/3/search/movie/?api_key=b6dba21fefcead0c857d43&callback=JSONP_CALLBACK&query=' + input;
  return this.jsonp.request(url, { method: 'Get' });
}
在组件中,我订阅了它,它正在工作

this.sharedService.getList(message)
.subscribe(data => {
  console.log(data['_body'])
  this.dataResult = <FilmCard[]>data['_body']['results'];
});

然而,在我的url中,我使用的是
https
,而不是
http

粘贴
https://api.themoviedb.org/3/search/movie/
进入浏览器地址栏,注意发生了什么:它重定向到相应的非https URL。因此,该API端点实际上没有可用的https URL,这意味着您无法安全地使用它,这意味着浏览器将不允许您从安全(https)来源提供的文档/web应用程序成功请求。我的错。。经过一夜的开发。。无在线演示:/
Mixed Content: The page at 'https://githamza.github.io/ngxs-app-example/home' was loaded over HTTPS, but requested an insecure script 'http://api.themoviedb.org/3/search/movie?api_key=b6dba21fefcdf58eb57d43&callback=__ng_jsonp__.__req2.finished&query=cal'. This request has been blocked; the content must be served over HTTPS.