cn.majingjing.http.client.interceptor.sample.Demo2HttpInterceptor Maven / Gradle / Ivy
The newest version!
package cn.majingjing.http.client.interceptor.sample;
import cn.majingjing.http.client.exception.HttpClientException;
import cn.majingjing.http.client.handler.chain.HttpChain;
import cn.majingjing.http.client.interceptor.HttpInterceptor;
import cn.majingjing.http.client.response.HttpResponse;
/**
* @author MaMarion
* @date 2020/5/1
*/
public class Demo2HttpInterceptor implements HttpInterceptor {
@Override
public HttpResponse intercept(HttpChain chain) throws HttpClientException {
System.out.println("Demo1HttpInterceptor-2-start");
HttpResponse proceed = chain.proceed(chain.getHttpRequest());
System.out.println("Demo1HttpInterceptor-2-end"+proceed.getStatusCode());
return proceed;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy