/** * Create the processor with the following interceptors: * <ul> * <li>{@link RequestDefaultHeaders}</li> * <li>{@link RequestContent}</li> * <li>{@link RequestTargetHost}</li> * <li>{@link RequestClientConnControl}</li> * <li>{@link RequestUserAgent}</li> * <li>{@link RequestExpectContinue}</li> * <li>{@link RequestAddCookies}</li> * <li>{@link ResponseProcessCookies}</li> * <li>{@link RequestAuthCache}</li> * <li>{@link RequestTargetAuthentication}</li> * <li>{@link RequestProxyAuthentication}</li> * </ul> * <p> * @return the processor with the added interceptors. */ @Override protected BasicHttpProcessor createHttpProcessor() { BasicHttpProcessor httpproc = new BasicHttpProcessor(); httpproc.addInterceptor(new RequestDefaultHeaders()); // Required protocol interceptors httpproc.addInterceptor(new RequestContent()); httpproc.addInterceptor(new RequestTargetHost()); // Recommended protocol interceptors httpproc.addInterceptor(new RequestClientConnControl()); httpproc.addInterceptor(new RequestUserAgent()); httpproc.addInterceptor(new RequestExpectContinue()); // HTTP state management interceptors httpproc.addInterceptor(new RequestAddCookies()); httpproc.addInterceptor(new ResponseProcessCookies()); // HTTP authentication interceptors httpproc.addInterceptor(new RequestAuthCache()); httpproc.addInterceptor(new RequestTargetAuthentication()); httpproc.addInterceptor(new RequestProxyAuthentication()); return httpproc; }
/** * Create the processor with the following interceptors: * <ul> * <li>{@link RequestDefaultHeaders}</li> * <li>{@link RequestContent}</li> * <li>{@link RequestTargetHost}</li> * <li>{@link RequestClientConnControl}</li> * <li>{@link RequestUserAgent}</li> * <li>{@link RequestExpectContinue}</li> * <li>{@link RequestAddCookies}</li> * <li>{@link ResponseProcessCookies}</li> * <li>{@link RequestAuthCache}</li> * <li>{@link RequestTargetAuthentication}</li> * <li>{@link RequestProxyAuthentication}</li> * </ul> * <p> * @return the processor with the added interceptors. */ @Override protected BasicHttpProcessor createHttpProcessor() { final BasicHttpProcessor httpproc = new BasicHttpProcessor(); httpproc.addInterceptor(new RequestDefaultHeaders()); // Required protocol interceptors httpproc.addInterceptor(new RequestContent()); httpproc.addInterceptor(new RequestTargetHost()); // Recommended protocol interceptors httpproc.addInterceptor(new RequestClientConnControl()); httpproc.addInterceptor(new RequestUserAgent()); httpproc.addInterceptor(new RequestExpectContinue()); // HTTP state management interceptors httpproc.addInterceptor(new RequestAddCookies()); httpproc.addInterceptor(new ResponseProcessCookies()); // HTTP authentication interceptors httpproc.addInterceptor(new RequestAuthCache()); httpproc.addInterceptor(new RequestTargetAuthentication()); httpproc.addInterceptor(new RequestProxyAuthentication()); return httpproc; }
@Override protected BasicHttpProcessor createHttpProcessor() { BasicHttpProcessor httpproc = new BasicHttpProcessor(); httpproc.addInterceptor(new RequestDefaultHeaders()); // Required protocol interceptors httpproc.addInterceptor(new RequestContent()); httpproc.addInterceptor(new RequestTargetHost()); // Recommended protocol interceptors httpproc.addInterceptor(new RequestClientConnControl()); httpproc.addInterceptor(new RequestUserAgent()); httpproc.addInterceptor(new RequestExpectContinue()); // HTTP state management interceptors httpproc.addInterceptor(new RequestAddCookies()); httpproc.addInterceptor(new ResponseProcessCookies()); // HTTP authentication interceptors httpproc.addInterceptor(new RequestTargetAuthentication()); httpproc.addInterceptor(new RequestProxyAuthentication()); return httpproc; }