Dela via


RequestTimeoutPolicy Class

Definition

Defines the policy for request timeouts middleware.

public sealed class RequestTimeoutPolicy
type RequestTimeoutPolicy = class
Public NotInheritable Class RequestTimeoutPolicy
Inheritance
RequestTimeoutPolicy

Constructors

RequestTimeoutPolicy()

Properties

Timeout

The timeout to apply.

TimeoutStatusCode

Status code to be set in response when a timeout results in an OperationCanceledException being caught by the middleware. The status code cannot be applied if the response has already started. 504 will be used if none is specified.

WriteTimeoutResponse

A callback for creating a timeout response. This is called if a timeout results in an OperationCanceledException being caught by the middleware. The status code will be set first. The status code and callback cannot be applied if the response has already started. The default behavior is an empty response with only the status code.

Applies to