ResponseValidationPolicyBuilder Class

  • java.lang.Object
    • com.azure.storage.common.policy.ResponseValidationPolicyBuilder

public class ResponseValidationPolicyBuilder

Builder for a policy to do validation of general response behavior.

Constructor Summary

Constructor Description
ResponseValidationPolicyBuilder()

Creates a new instance of ResponseValidationPolicyBuilder.

Method Summary

Modifier and Type Method and Description
ResponseValidationPolicyBuilder addOptionalEcho(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.

ResponseValidationPolicyBuilder addOptionalEcho(String headerName)

Deprecated

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.

HttpPipelinePolicy build()

Builds the policy described by this builder.

Methods inherited from java.lang.Object

Constructor Details

ResponseValidationPolicyBuilder

public ResponseValidationPolicyBuilder()

Creates a new instance of ResponseValidationPolicyBuilder.

Method Details

addOptionalEcho

public ResponseValidationPolicyBuilder addOptionalEcho(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

@Deprecated
public ResponseValidationPolicyBuilder addOptionalEcho(String headerName)

Deprecated

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.

build

public HttpPipelinePolicy build()

Builds the policy described by this builder.

Returns:

The policy.

Applies to