RequestContext Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Options that can be used to control the behavior of a request sent by a client.
public class RequestContext
type RequestContext = class
Public Class RequestContext
- Inheritance
-
RequestContext
Request |
Initializes a new instance of the RequestContext class. |
Cancellation |
The token to check for cancellation. |
Error |
Controls under what conditions the operation raises an exception if the underlying response indicates a failure. |
Add |
Customizes the ResponseClassifier for this operation to change the default Response classification behavior so that it considers the passed-in status code to be an error or not, as specified. Status code classifiers are applied after all ResponseClassificationHandler classifiers. This is useful for cases where you'd like to prevent specific response status codes from being treated as errors by logging and distributed tracing policies -- that is, if a response is not classified as an error, it will not appear as an error in logs or distributed traces. |
Add |
Customizes the ResponseClassifier for this operation. Adding a ResponseClassificationHandler changes the classification behavior so that it first tries to classify a response via the handler, and if the handler doesn't have an opinion, it instead uses the default classifier. Handlers are applied in order so the most recently added takes precedence. This is useful for cases where you'd like to prevent specific response status codes from being treated as errors by logging and distributed tracing policies -- that is, if a response is not classified as an error, it will not appear as an error in logs or distributed traces. |
Add |
Adds an HttpPipelinePolicy into the pipeline for the duration of this request.
The position of policy in the pipeline is controlled by |
Implicit(Error |
Initializes a new instance of the RequestContext class using the given ErrorOptions. |
제품 | 버전 |
---|---|
Azure SDK for .NET | Latest |
Azure SDK for .NET 피드백
Azure SDK for .NET은(는) 오픈 소스 프로젝트입니다. 다음 링크를 선택하여 피드백을 제공해 주세요.