com.azure.core.http.policy
This package contains the HttpPipelinePolicy interface and its implementations. These policies are used to form an HTTP pipeline, which is a series of policies that are invoked to handle an HTTP request.
The HttpPipelinePolicy interface defines process and processSync methods. These methods transform an HTTP request into an HttpResponse asynchronously and synchronously respectively. Implementations of this interface can modify the request, pass it to the next policy, and then modify the response.
Code Sample:
In this example, the UserAgentPolicy, RetryPolicy, and CustomPolicy are added to the pipeline. The pipeline is then used to send an HTTP request, and the response is retrieved.
HttpPipeline pipeline = new HttpPipelineBuilder()
.policies(new UserAgentPolicy(), new RetryPolicy(), new CustomPolicy())
.build();
HttpRequest request = new HttpRequest(HttpMethod.GET, new URL("http://example.com"));
HttpResponse response = pipeline.send(request).block();
This package is crucial for the communication between Azure SDK client libraries and Azure services. It provides a layer of abstraction over the HTTP protocol, allowing client libraries to focus on service-specific logic.
Add |
The |
Add |
The pipeline policy that override or add HttpHeaders in HttpRequest by reading values from Context with key 'azure-http-headers-key'. |
Add |
The |
Azure |
The |
Azure |
The |
Bearer |
The |
Cookie |
The |
Default |
The |
Exponential |
The |
Exponential |
The |
Fixed |
The |
Fixed |
The |
Host |
The |
Http |
The |
Http |
The |
Http |
The |
Http |
The |
Http |
The |
Http |
The |
Key |
The |
Port |
The |
Protocol |
The |
Redirect |
The |
Request |
The |
Request |
Information about the request that failed, used to determine whether a retry should be attempted. |
Retry |
The |
Retry |
The |
Timeout |
Deprecated Consider configuring timeouts with HttpClientOptions. |
User |
The |
After |
Implementing classes are automatically added as policies after the retry policy. |
Before |
Implementing classes are automatically added as policies before the retry policy. |
Http |
A policy within the HttpPipeline. |
Http |
Implementing classes automatically provide policies. |
Http |
Manages logging HTTP requests in HttpLoggingPolicy. |
Http |
Manages logging HTTP responses in HttpLoggingPolicy. |
Redirect |
The interface for determining the RedirectStrategy used in RedirectPolicy. |
Retry |
The interface for determining the retry strategy used in RetryPolicy. |
Http |
The |
Azure SDK for Java geri bildirimi
Azure SDK for Java, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: