Class Executor
java.lang.Object
org.apache.hc.client5.http.fluent.Executor
Executor for
Requests.
A connection pool with maximum 100 connections per route and a total maximum of 200 connections is used internally.
- Since:
- 4.2
-
Method Summary
Modifier and TypeMethodDescriptionauth(org.apache.hc.client5.http.auth.AuthScope authScope, org.apache.hc.client5.http.auth.Credentials credentials) auth(org.apache.hc.core5.http.HttpHost host, String username, char[] password, String workstation, String domain) Deprecated.auth(org.apache.hc.core5.http.HttpHost host, org.apache.hc.client5.http.auth.Credentials credentials) authPreemptive(String host) authPreemptive(org.apache.hc.core5.http.HttpHost host) authPreemptiveProxy(String proxy) authPreemptiveProxy(org.apache.hc.core5.http.HttpHost proxy) Executes the request.static Executorstatic ExecutornewInstance(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient httpclient) This feature is considered experimental and may be discontinued in the future.static ExecutornewInstance(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpclient) use(org.apache.hc.client5.http.auth.CredentialsStore credentialsStore) use(org.apache.hc.client5.http.cookie.CookieStore cookieStore)
-
Method Details
-
newInstance
-
newInstance
public static Executor newInstance(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpclient) -
newInstance
@Experimental public static Executor newInstance(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient httpclient) This feature is considered experimental and may be discontinued in the future.- Since:
- 5.5
-
use
- Returns:
- this instance.
- Since:
- 4.5
-
auth
public Executor auth(org.apache.hc.client5.http.auth.AuthScope authScope, org.apache.hc.client5.http.auth.Credentials credentials) -
auth
public Executor auth(org.apache.hc.core5.http.HttpHost host, org.apache.hc.client5.http.auth.Credentials credentials) -
auth
- Returns:
- this instance.
- Since:
- 4.4
-
authPreemptive
-
authPreemptive
- Returns:
- this instance.
- Since:
- 4.4
-
authPreemptiveProxy
-
authPreemptiveProxy
- Returns:
- this instance.
- Since:
- 4.4
-
auth
-
auth
@Deprecated public Executor auth(org.apache.hc.core5.http.HttpHost host, String username, char[] password, String workstation, String domain) Deprecated.- Returns:
- this instance.
-
clearAuth
-
use
- Returns:
- this instance.
- Since:
- 4.5
-
clearCookies
-
execute
Executes the request. Please Note that response content must be processed or discarded usingResponse.discardContent(), otherwise the connection used for the request might not be released to the pool.- Throws:
IOException- See Also:
-
auth(HttpHost, String, char[]).