HttpMessage Class

Definition

Represents a context flowing through the HttpPipeline.

public sealed class HttpMessage : IDisposable
type HttpMessage = class
    interface IDisposable
Public NotInheritable Class HttpMessage
Implements IDisposable
Inheritance
HttpMessage
Implements

Constructors

HttpMessage(Request, ResponseClassifier)

Creates a new instance of HttpMessage.

Properties

BufferResponse

Gets or sets the value indicating if response would be buffered as part of the pipeline. Defaults to true.

CancellationToken

The CancellationToken to be used during the HttpMessage processing.

HasResponse

Gets the value indicating if the response is set on this message.

NetworkTimeout

Gets or sets the network timeout value for this message. If null the value provided in NetworkTimeout would be used instead. Defaults to null.

Request

Gets the Request associated with this message.

Response

Gets the Response associated with this message. Throws an exception if it wasn't set yet. To avoid the exception use HasResponse property to check.

ResponseClassifier

The ResponseClassifier instance to use for response classification during pipeline invocation.

Methods

Dispose()

Disposes the request and response.

ExtractResponseContent()

Returns the response content stream and releases it ownership to the caller. After calling this methods using ContentStream or Content would result in exception.

SetProperty(String, Object)

Sets a property that modifies the pipeline behavior. Please refer to individual policies documentation on what properties it supports.

TryGetProperty(String, Object)

Gets a property that modifies the pipeline behavior. Please refer to individual policies documentation on what properties it supports.

Applies to