代码之家  ›  专栏  ›  技术社区  ›  Chaitanya MSV

如何打开到httpS URL的流

  •  0
  • Chaitanya MSV  · 技术社区  · 16 年前

    请告诉我怎么做。

    当做

    1 回复  |  直到 16 年前
        1
  •  2
  •   ChssPly76    16 年前

    这里有一个关于太阳的教程 Reading from / Writing to URL connection

    打开HTTPS连接与打开HTTP连接没有区别;如果需要使用特定于https的方法,可以对 url.openConnection() 到 HttpsURLConnection

    URL url = new URL("https://your.https.url.here/");
    HttpsURLConnection connection = (HttpsURLConnection) myurl.openConnection();