(Chain chain)
| 30 | //添加请求头 |
| 31 | .addInterceptor(new Interceptor() { |
| 32 | @Override |
| 33 | public Response intercept(Chain chain) throws IOException { |
| 34 | //添加请求头 |
| 35 | Request request = chain.request().newBuilder() |
| 36 | .addHeader("Host", host) |
| 37 | .addHeader("User-Agent", userAgent) |
| 38 | .addHeader("xRequestedWith", xRequestedWith) |
| 39 | .build(); |
| 40 | |
| 41 | return chain.proceed(request); |
| 42 | } |
| 43 | }); |
| 44 | } |
| 45 |
nothing calls this directly
no outgoing calls
no test coverage detected