Commit cbed9b96 by 罗翻

Api修改

parent e0fe8b56
...@@ -35,15 +35,17 @@ public class Api { ...@@ -35,15 +35,17 @@ public class Api {
private static Retrofit downloadRetrofit; private static Retrofit downloadRetrofit;
/** /**
*普通retrofit. * 普通retrofit.
*
* @return * @return
*/ */
public static APIService getService() { public static <T> T getService(Class<T> cls) {
return getRetrofit().create(APIService.class); return getRetrofit().create(cls);
} }
/** /**
* 下载的retrofit. * 下载的retrofit.
*
* @return * @return
*/ */
public static APIService getDownloadService() { public static APIService getDownloadService() {
...@@ -111,7 +113,6 @@ public class Api { ...@@ -111,7 +113,6 @@ public class Api {
.build(); .build();
} }
} }
// Log.d("request_header", request.headers().toString());
return chain.proceed(request); return chain.proceed(request);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment