List of usage examples for org.apache.http.hacked HackedDefaultHttpClient HackedDefaultHttpClient
public HackedDefaultHttpClient(ClientConnectionManager conman, HttpParams params)
From source file:org.apache.http.hacked.HackedHttpComponentsClientHttpRequestFactory.java
/** * {@inheritDoc}/* w w w .j a v a 2s . c o m*/ */ public HackedHttpComponentsClientHttpRequestFactory() { super(); Field declaredField; try { declaredField = HttpComponentsClientHttpRequestFactory.class.getDeclaredField("httpClient"); declaredField.setAccessible(true); HackedDefaultHttpClient hackedDefaultHttpClient = new HackedDefaultHttpClient( getHttpClient().getConnectionManager(), null); declaredField.set(this, hackedDefaultHttpClient); } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { throw new RuntimeException(e); } }