HttpPipeline Class
- java.
lang. Object - com.
azure. core. http. HttpPipeline
- com.
public final class HttpPipeline
The HTTP pipeline through which HTTP requests and responses flow.
This class encapsulates the HTTP pipeline that applies a set of HttpPipelinePolicy to the request before it is sent and on the response as it is being returned.
It provides methods to get the policy at a specific index in the pipeline, get the count of policies in the pipeline, get the associated HttpClient, and send the HTTP request through the pipeline.
This class is useful when you want to send an HTTP request and apply a set of policies to the request and response.
Method Summary
Modifier and Type | Method and Description |
---|---|
Http |
getHttpClient()
Get the HttpClient associated with the pipeline. |
Http |
getPolicy(int index)
Get the policy at the passed index in the pipeline. |
int |
getPolicyCount()
Get the count of policies in the pipeline. |
Tracer |
getTracer()
Get the Tracer associated with the pipeline. |
Mono<Http |
send(HttpPipelineCallContext context)
Sends the context (containing an HTTP request) through pipeline. |
Mono<Http |
send(HttpRequest request)
Wraps the |
Mono<Http |
send(HttpRequest request, Context data)
Wraps the request in a context with additional metadata and sends it through the pipeline. |
Http |
sendSync(HttpRequest request, Context data)
Wraps the request in a context with additional metadata and sends it through the pipeline. |
Methods inherited from java.lang.Object
Method Details
getHttpClient
public HttpClient getHttpClient()
Get the HttpClient associated with the pipeline.
Returns:
getPolicy
public HttpPipelinePolicy getPolicy(int index)
Get the policy at the passed index in the pipeline.
Parameters:
Returns:
getPolicyCount
public int getPolicyCount()
Get the count of policies in the pipeline.
Returns:
getTracer
send
public Mono
Sends the context (containing an HTTP request) through pipeline.
Parameters:
Returns:
send
public Mono
Wraps the request
in a context and sends it through pipeline.
Parameters:
Returns:
send
public Mono
Wraps the request in a context with additional metadata and sends it through the pipeline.
Parameters:
Returns:
sendSync
public HttpResponse sendSync(HttpRequest request, Context data)
Wraps the request in a context with additional metadata and sends it through the pipeline.
Parameters:
Returns:
Applies to
Azure SDK for Java
피드백
https://aka.ms/ContentUserFeedback을 참조하세요.
출시 예정: 2024년 내내 콘텐츠 피드백 메커니즘인 GitHub 문제를 단계적으로 폐지하고 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은다음에 대한 사용자 의견 제출 및 보기