Package com.azure.storage.common.policy
Class ResponseValidationPolicyBuilder
java.lang.Object
com.azure.storage.common.policy.ResponseValidationPolicyBuilder
Builder for a policy to do validation of general response behavior.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImmutable policy for asserting validations on general responses. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOptionalEcho(com.azure.core.http.HttpHeaderName 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.addOptionalEcho(String headerName) Deprecated.com.azure.core.http.policy.HttpPipelinePolicybuild()Builds the policy described by this builder.
-
Constructor Details
-
ResponseValidationPolicyBuilder
public ResponseValidationPolicyBuilder()Creates a new instance ofResponseValidationPolicyBuilder.
-
-
Method Details
-
build
public com.azure.core.http.policy.HttpPipelinePolicy build()Builds the policy described by this builder.- Returns:
- The policy.
-
addOptionalEcho
Deprecated.UseaddOptionalEcho(HttpHeaderName)instead.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.
-
addOptionalEcho
public ResponseValidationPolicyBuilder addOptionalEcho(com.azure.core.http.HttpHeaderName 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.
-
addOptionalEcho(HttpHeaderName)instead.