从https网页获取json数据

get json data from a https webpage

我喜欢从外部网页获取json数据,并在我的Xpages中使用此数据。
外部网站具有协议https。

所以我不能使用

1
2
3
var http_request = new XMLHttpRequest();

http_request.open("GET","XX");

有人对我有暗示吗?


或者,您可以将JSONP用于GET请求:

http://dojotoolkit.org/reference-guide/1.8/dojo/io/script.html


通过f.e.将其获取到后端XPage和HttpURLConnection类。此XPage可以将JSON数据提供给客户端,因此您可以使用XMLHttpRequest。


您可以将XMLHttpRequest对象用于Https协议。

请参阅https://stackoverflow.com/a/6301294/1029621