All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.majingjing.http.client.interceptor.sample.Demo1HttpInterceptor 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 Demo1HttpInterceptor implements HttpInterceptor {


    @Override
    public HttpResponse intercept(HttpChain chain) throws HttpClientException {
        System.out.println("Demo1HttpInterceptor-1-start");
        HttpResponse proceed = chain.proceed(chain.getHttpRequest());
        System.out.println("Demo1HttpInterceptor-1-end"+proceed.getStatusCode());
        return proceed;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy