简体   繁体   English

在Angularjs中发出https请求

[英]Make https request in Angularjs

In AngularJS I am writing the following code, $http.get(url).then.... 在AngularJS中,我正在编写以下代码,$ http.get(url).then ....

is sending http request where as my server is configured for https. 正在发送http请求,其中我的服务器配置为https。 When using $http.get, I see following in the firebug console. 使用$ http.get时,我在firebug控制台中看到以下内容。

Blocked loading mixed active content 阻止加载混合的活动内容

What is the way to issue https requests in angularjs. 在angularjs中发出https请求的方式是什么。 No documentation could be found on this topic. 在此主题上找不到任何文档。

EDIT My Exact code is: 编辑我的确切代码是:

$http.get(url).then(function(response) {
                        return response;
                    });

The URL requested shown in firebug is : GET http://localhost:8080/content/help/en/photoshop/product-details.js Firebug中显示的请求URL是:GET http:// localhost:8080 / content / help / en / photoshop / product-details.js

Try this code. 试试这个代码。

remove http and start as //localhost:8080/content 删除http并以// localhost:8080 / content开头

Credits 学分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM