Interface HttpPipelinePolicy

All Known Implementing Classes:
AddDatePolicy, AddHeadersFromContextPolicy, AddHeadersPolicy, AzureKeyCredentialPolicy, AzureSasCredentialPolicy, BearerTokenAuthenticationPolicy, CookiePolicy, HostPolicy, HttpLoggingPolicy, HttpPipelineSyncPolicy, PortPolicy, ProtocolPolicy, RedirectPolicy, RequestIdPolicy, RetryPolicy, TimeoutPolicy, UserAgentPolicy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface HttpPipelinePolicy
A policy within the HttpPipeline.
See Also:
  • Method Details

    • process

      Processes provided request context and invokes the next policy.
      Parameters:
      context - The request context.
      next - The next policy to invoke.
      Returns:
      A publisher that initiates the request upon subscription and emits a response on completion.
    • processSync

      default HttpResponse processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next)
      Processes provided request context and invokes the next policy synchronously.
      Parameters:
      context - The request context.
      next - The next policy to invoke.
      Returns:
      A publisher that initiates the request upon subscription and emits a response on completion.
    • getPipelinePosition

      default HttpPipelinePosition getPipelinePosition()
      Gets the position to place the policy.

      By default pipeline policies are positioned HttpPipelinePosition.PER_RETRY.

      Returns:
      The position to place the policy.