Class CachingHttpClients
java.lang.Object
org.apache.hc.client5.http.impl.cache.CachingHttpClients
Factory methods for
CloseableHttpClient instances
capable of client-side caching.- Since:
- 4.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hc.client5.http.impl.classic.CloseableHttpClientcreateFileBound(File cacheDir) CreatesCloseableHttpClientinstance that uses a file system bound response cache.static org.apache.hc.client5.http.impl.classic.CloseableHttpClientCreatesCloseableHttpClientinstance that uses a memory bound response cache.static CachingHttpClientBuildercustom()Creates builder object for construction of customCloseableHttpClientinstances.
-
Method Details
-
custom
Creates builder object for construction of customCloseableHttpClientinstances. -
createMemoryBound
public static org.apache.hc.client5.http.impl.classic.CloseableHttpClient createMemoryBound()CreatesCloseableHttpClientinstance that uses a memory bound response cache. -
createFileBound
public static org.apache.hc.client5.http.impl.classic.CloseableHttpClient createFileBound(File cacheDir) CreatesCloseableHttpClientinstance that uses a file system bound response cache.- Parameters:
cacheDir- location of response cache.
-