| 程序包 | 说明 |
|---|---|
| org.apache.hc.client5.http.impl.async |
Asynchronous HTTP client API implementation that supports both
HTTP/2 and HTTP/1.1 transport.
|
| org.apache.hc.client5.http.impl.classic |
Classic HTTP client API implementation that supports HTTP/1.1 transport
only.
|
| org.apache.hc.client5.http.protocol |
HTTP protocol interceptors that enable advanced functionality
such as HTTP state management and authentication state caching.
|
| org.apache.hc.core5.http.protocol |
Core HTTP protocol interceptors.
|
| org.apache.hc.core5.http2.protocol |
HTTP/2 protocol interceptors.
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpAsyncClientBuilder |
HttpAsyncClientBuilder.addRequestInterceptorFirst(HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the head of the protocol processing list.
|
H2AsyncClientBuilder |
H2AsyncClientBuilder.addRequestInterceptorFirst(HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the head of the protocol processing list.
|
HttpAsyncClientBuilder |
HttpAsyncClientBuilder.addRequestInterceptorLast(HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the tail of the protocol processing list.
|
H2AsyncClientBuilder |
H2AsyncClientBuilder.addRequestInterceptorLast(HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the tail of the protocol processing list.
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpClientBuilder |
HttpClientBuilder.addRequestInterceptorFirst(HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the head of the protocol processing list.
|
HttpClientBuilder |
HttpClientBuilder.addRequestInterceptorLast(HttpRequestInterceptor interceptor)
Adds this protocol interceptor to the tail of the protocol processing list.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
RequestAddCookies
Request interceptor that matches cookies available in the current
CookieStore to the request being executed and generates
corresponding Cookie request headers. |
class |
RequestAuthCache
已过时。
Do not use.
|
class |
RequestClientConnControl
This protocol interceptor is responsible for adding the
Connection
header to the outgoing requests, which is essential for managing persistence
of HTTP/1.0 connections. |
class |
RequestDefaultHeaders
Request interceptor that adds default request headers.
|
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
HttpProcessor
HTTP protocol processor is a collection of protocol interceptors that
implements the 'Chain of Responsibility' pattern, where each individual
protocol interceptor is expected to work on a particular aspect of the HTTP
protocol the interceptor is responsible for.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
DefaultHttpProcessor
Default immutable implementation of
HttpProcessor. |
class |
RequestConnControl
RequestConnControl is responsible for adding
Connection header
to the outgoing requests, which is essential for managing persistence of
HTTP/1.0 connections. |
class |
RequestContent
RequestContent is the most important interceptor for outgoing requests.
|
class |
RequestDate
RequestDate interceptor is responsible for adding
Date header
to the outgoing requests This interceptor is optional for client side
protocol processors. |
class |
RequestExpectContinue
RequestExpectContinue is responsible for enabling the 'expect-continue'
handshake by adding
Expect header. |
class |
RequestTargetHost
RequestHostOutgoing is responsible for adding
Host header to the outgoing message. |
class |
RequestUserAgent
RequestUserAgent is responsible for adding
User-Agent header. |
class |
RequestValidateHost
RequestTargetHost is responsible for copying
Host header value to
HttpRequest.setAuthority(URIAuthority) of the incoming message. |
| 限定符和类型 | 字段和说明 |
|---|---|
static HttpRequestInterceptor |
RequestContent.INSTANCE
Singleton instance.
|
static HttpRequestInterceptor |
RequestConnControl.INSTANCE
Singleton instance.
|
static HttpRequestInterceptor |
RequestTargetHost.INSTANCE
Singleton instance.
|
static HttpRequestInterceptor |
RequestUserAgent.INSTANCE
Singleton instance.
|
static HttpRequestInterceptor |
RequestDate.INSTANCE
Singleton instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpProcessorBuilder |
HttpProcessorBuilder.add(HttpRequestInterceptor e) |
HttpProcessorBuilder |
HttpProcessorBuilder.addAll(HttpRequestInterceptor... e) |
HttpProcessorBuilder |
HttpProcessorBuilder.addAllFirst(HttpRequestInterceptor... e) |
HttpProcessorBuilder |
HttpProcessorBuilder.addAllLast(HttpRequestInterceptor... e) |
HttpProcessorBuilder |
HttpProcessorBuilder.addFirst(HttpRequestInterceptor e) |
HttpProcessorBuilder |
HttpProcessorBuilder.addLast(HttpRequestInterceptor e) |
| 构造器和说明 |
|---|
DefaultHttpProcessor(HttpRequestInterceptor... requestInterceptors) |
DefaultHttpProcessor(HttpRequestInterceptor[] requestInterceptors,
HttpResponseInterceptor[] responseInterceptors) |
| 构造器和说明 |
|---|
DefaultHttpProcessor(List<HttpRequestInterceptor> requestInterceptors,
List<HttpResponseInterceptor> responseInterceptors) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
H2RequestConnControl
HTTP/2 compatible extension of
RequestConnControl. |
class |
H2RequestContent
HTTP/2 compatible extension of
RequestContent. |
class |
H2RequestTargetHost
HTTP/2 compatible extension of
RequestTargetHost. |
class |
H2RequestValidateHost
HTTP/2 compatible extension of
RequestValidateHost. |
Copyright © 2023. All rights reserved.