Esempio n. 1
0
 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;
         }
       });
 }
Esempio n. 2
0
 public static TaskControllerImpl task() {
   if (taskController == null) {
     taskController = TaskControllerImpl.registerInstance();
   }
   return taskController;
 }