Package com.azure.storage.common.policy
Class ResponseValidationPolicyBuilder
- java.lang.Object
-
- com.azure.storage.common.policy.ResponseValidationPolicyBuilder
-
public class ResponseValidationPolicyBuilder extends Object
Builder for a policy to do validation of general response behavior.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ResponseValidationPolicyBuilder.ResponseValidationPolicy
Immutable policy for asserting validations on general responses.
-
Constructor Summary
Constructors Constructor Description ResponseValidationPolicyBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.com.azure.core.http.policy.HttpPipelinePolicy
build()
Builds the policy described by this builder.
-
-
-
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.
-
-