Does Android Volley support SSL?

后端 未结 3 1463
迷失自我
迷失自我 2020-11-27 04:39

Does anyone know whether Volley supports SSl in Android? Is there is any way to support SSL via Volley?

3条回答
  •  自闭症患者
    2020-11-27 05:32

    I would like to look further @BNK 's answer. Suggest

    requestQueue = Volley.newRequestQueue(getApplicationContext(), new HurlStack(null, getSSLSocketFactory()));
    

    would be enough. Don't know why , by follow @BNK 's answer that extends createConnection , Volley create about 5 connections for reuse which observed by netstat command By just passing getSSLSocketFactory() as new HurlStack() parameter, the connection opened by Volley is reduced.

提交回复
热议问题