你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

PipelineResponse Class

A pipeline response object.

The PipelineResponse interface exposes an HTTP response object as it returns through the pipeline of Policy objects. This ensures that Policy objects have access to the HTTP response.

This also has a "context" object where policy can put additional fields. Policy SHOULD update the "context" with additional post-processed field if they create them. However, nothing prevents a policy to actually sub-class this class a return it instead of the initial instance.

Constructor

PipelineResponse(http_request: HTTPRequestType, http_response: HTTPResponseType, context: PipelineContext)

Parameters

Name Description
http_request
Required

The request object.

http_response
Required

The response object.

context
Required

Contains the context - data persisted between pipeline requests.