Package com.azure.android.core.http
Interface HttpPipelinePolicy
- 
- All Known Implementing Classes:
 AddDatePolicy,AddHeadersPolicy,AzureKeyCredentialPolicy,BearerTokenAuthenticationPolicy,CookiePolicy,HostPolicy,HttpLoggingPolicy,PortPolicy,ProtocolPolicy,RequestIdPolicy,RetryPolicy,UserAgentPolicy
public interface HttpPipelinePolicyA policy within theHttpPipeline.- See Also:
 HttpPipeline
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidprocess(HttpPipelinePolicyChain chain)Applies the policy to aHttpRequestand the correspondingHttpResponse. 
 - 
 
- 
- 
Method Detail
- 
process
void process(HttpPipelinePolicyChain chain)
Applies the policy to aHttpRequestand the correspondingHttpResponse.Policy implementations are expected to use
HttpPipelinePolicyChain.getRequest()to access and intercept the request, then proceed to next policy by callingHttpPipelinePolicyChain.processNextPolicy(HttpRequest)orHttpPipelinePolicyChain.processNextPolicy(HttpRequest, NextPolicyCallback). The policy can intercept the resulting response notified toNextPolicyCallback.onSuccess(HttpResponse, PolicyCompleter)or error notified toNextPolicyCallback.onError(Throwable, PolicyCompleter)and must signal the completion of the policy by callingPolicyCompleter.completed(HttpResponse)orPolicyCompleter.completedError(Throwable).- Parameters:
 chain- The chain for the policy to access the request and response.
 
 - 
 
 -