- GET请求可以直接链接
- POST请求需要使用Postman或者其它请求发送模拟器
- 1拷贝NetWorkInterceptor.java
- 2addInterceptor
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.addInterceptor(new NetWorkInterceptor())
.build();
OkHttp的请求拦截器,实现请求拦截,打印日志到logcat
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.addInterceptor(new NetWorkInterceptor())
.build();
OkHttp的请求拦截器,实现请求拦截,打印日志到logcat
Apache License 2.0