public LiteHttp(Context context) { mContext = context; httpManagerImpl = HttpManagerImpl.registerInstance(); taskController = TaskControllerImpl.registerInstance(); // 默认信任所有https域名 HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return true; } }); }
public static TaskControllerImpl task() { if (taskController == null) { taskController = TaskControllerImpl.registerInstance(); } return taskController; }