Class ResponseValidationPolicyBuilder


  • public class ResponseValidationPolicyBuilder
    extends Object
    Builder for a policy to do validation of general response behavior.
    • Constructor Detail

      • ResponseValidationPolicyBuilder

        public ResponseValidationPolicyBuilder()
    • Method Detail

      • build

        public com.azure.core.http.policy.HttpPipelinePolicy build()
        Builds the policy described by this builder.
        Returns:
        The policy.
      • addOptionalEcho

        public ResponseValidationPolicyBuilder addOptionalEcho​(String headerName)
        Fluently applies an optional validation to this policy where, if the response contains the given header, asserts its value is an echo of the value provided in the request.
        Parameters:
        headerName - The header to validate.
        Returns:
        This policy.