类 HttpComponentsClientHttpRequest
java.lang.Object
cn.taketoday.http.client.AbstractClientHttpRequest
cn.taketoday.http.client.AbstractStreamingClientHttpRequest
cn.taketoday.http.client.HttpComponentsClientHttpRequest
- 所有已实现的接口:
ClientHttpRequest,HttpMessage,HttpOutputMessage,HttpRequest,StreamingHttpOutputMessage
ClientHttpRequest implementation based on
Apache HttpComponents HttpClient.
Created via the HttpComponentsClientHttpRequestFactory.
- 从以下版本开始:
- 4.0
- 作者:
- Oleg Kalnichevski, Arjen Poutsma, Juergen Hoeller, Harry Yang
- 另请参阅:
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 cn.taketoday.http.StreamingHttpOutputMessage
StreamingHttpOutputMessage.Body -
字段概要
字段修饰符和类型字段说明private final HttpClientprivate final org.apache.hc.core5.http.protocol.HttpContextprivate final org.apache.hc.core5.http.ClassicHttpRequestprivate final HttpMethod -
构造器概要
构造器构造器说明HttpComponentsClientHttpRequest(HttpClient client, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) -
方法概要
修饰符和类型方法说明(专用程序包) static voidaddHeaders(org.apache.hc.core5.http.ClassicHttpRequest httpRequest, HttpHeaders headers) Add the given headers to the given HTTP request.protected ClientHttpResponseexecuteInternal(HttpHeaders headers, StreamingHttpOutputMessage.Body body) Abstract template method that writes the given headers and content to the HTTP request.(专用程序包) org.apache.hc.core5.http.protocol.HttpContextReturn the HTTP method of the request.getURI()Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).从类继承的方法 cn.taketoday.http.client.AbstractStreamingClientHttpRequest
executeInternal, getBodyInternal, setBody从类继承的方法 cn.taketoday.http.client.AbstractClientHttpRequest
assertNotExecuted, execute, getBody, getHeaders从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.HttpMessage
getHeaders从接口继承的方法 cn.taketoday.http.HttpOutputMessage
getBody从接口继承的方法 cn.taketoday.http.HttpRequest
getMethodValue
-
字段详细资料
-
httpClient
-
httpContext
private final org.apache.hc.core5.http.protocol.HttpContext httpContext -
httpRequest
private final org.apache.hc.core5.http.ClassicHttpRequest httpRequest -
method
-
-
构造器详细资料
-
HttpComponentsClientHttpRequest
HttpComponentsClientHttpRequest(HttpClient client, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context)
-
-
方法详细资料
-
getMethod
从接口复制的说明:HttpRequestReturn the HTTP method of the request.- 返回:
- the HTTP method as an HttpMethod value
- 另请参阅:
-
getURI
从接口复制的说明:HttpRequestReturn the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).- 返回:
- the URI of the request (never
null)
-
getHttpContext
org.apache.hc.core5.http.protocol.HttpContext getHttpContext() -
executeInternal
protected ClientHttpResponse executeInternal(HttpHeaders headers, @Nullable StreamingHttpOutputMessage.Body body) throws IOException 从类复制的说明:AbstractStreamingClientHttpRequestAbstract template method that writes the given headers and content to the HTTP request.- 指定者:
executeInternal在类中AbstractStreamingClientHttpRequest- 参数:
headers- the HTTP headersbody- the HTTP body, may benullif no body was set- 返回:
- the response object for the executed request
- 抛出:
IOException
-
addHeaders
static void addHeaders(org.apache.hc.core5.http.ClassicHttpRequest httpRequest, HttpHeaders headers) Add the given headers to the given HTTP request.- 参数:
httpRequest- the request to add the headers toheaders- the headers to add
-