Package com.azure.core.http
Class HttpPipeline
java.lang.Object
com.azure.core.http.HttpPipeline
The HTTP pipeline that HTTP requests and responses will flow through.
The HTTP pipeline may apply a set of HttpPipelinePolicies
to the request before it is
sent and on the response as it is being returned.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet theHttpClient
associated with the pipeline.getPolicy
(int index) Get the policy at the passed index in the pipeline.int
Get the count of policies in the pipeline.Get theTracer
associated with the pipeline.send
(HttpPipelineCallContext context) Sends the context (containing an HTTP request) through pipeline.send
(HttpRequest request) Wraps therequest
in a context and sends it through pipeline.send
(HttpRequest request, Context data) Wraps the request in a context with additional metadata and sends it through the pipeline.sendSync
(HttpRequest request, Context data) Wraps the request in a context with additional metadata and sends it through the pipeline.
-
Method Details
-
getPolicy
Get the policy at the passed index in the pipeline.- Parameters:
index
- index of the policy to retrieve.- Returns:
- the policy stored at that index.
-
getPolicyCount
public int getPolicyCount()Get the count of policies in the pipeline.- Returns:
- count of policies.
-
getHttpClient
Get theHttpClient
associated with the pipeline.- Returns:
- the
HttpClient
associated with the pipeline
-
getTracer
Get theTracer
associated with the pipeline.- Returns:
- the
Tracer
associated with the pipeline
-
send
Wraps therequest
in a context and sends it through pipeline.- Parameters:
request
- The HTTP request to send.- Returns:
- A publisher upon subscription flows the context through policies, sends the request, and emits response upon completion.
-
send
Wraps the request in a context with additional metadata and sends it through the pipeline.- Parameters:
request
- THe HTTP request to send.data
- Additional metadata to pass along with the request.- Returns:
- A publisher upon subscription flows the context through policies, sends the request, and emits response upon completion.
-
send
Sends the context (containing an HTTP request) through pipeline.- Parameters:
context
- The request context.- Returns:
- A publisher upon subscription flows the context through policies, sends the request and emits response upon completion.
-
sendSync
Wraps the request in a context with additional metadata and sends it through the pipeline.- Parameters:
request
- THe HTTP request to send.data
- Additional metadata to pass along with the request.- Returns:
- A publisher upon subscription flows the context through policies, sends the request, and emits response upon completion.
-