Table of Contents

Class RequestMessage

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

Represents a request in the processing pipeline of the Azure Cosmos DB SDK.

public class RequestMessage : IDisposable
Inheritance
RequestMessage
Implements
Inherited Members
Extension Methods

Remarks

It is expected that direct property access is used for properties that will be read and used within the Azure Cosmos SDK pipeline, for example Microsoft.Azure.Cosmos.RequestMessage.OperationType. Properties should be used for any other property that needs to be sent to the backend but will not be read nor used within the Azure Cosmos DB SDK pipeline. Headers should be used for HTTP headers that need to be passed down and sent to the backend.

Constructors

RequestMessage()

Create a RequestMessage

public RequestMessage()

RequestMessage(HttpMethod, Uri)

Create a RequestMessage

public RequestMessage(HttpMethod method, Uri requestUri)

Parameters

method HttpMethod

The http method

requestUri Uri

The requested URI

Properties

Content

Gets or sets the current RequestMessage payload.

public virtual Stream Content { get; set; }

Property Value

Stream

Headers

Gets the current RequestMessage HTTP headers.

public virtual Headers Headers { get; }

Property Value

Headers

Method

Gets the HttpMethod for the current request.

public virtual HttpMethod Method { get; }

Property Value

HttpMethod

Properties

Request properties Per request context available to handlers. These will not be automatically included into the wire.

public virtual Dictionary<string, object> Properties { get; }

Property Value

Dictionary<string, object>

RequestUri

Gets the System.Uri for the current request.

public virtual Uri RequestUri { get; }

Property Value

Uri

Methods

Dispose()

Disposes the current RequestMessage.

public void Dispose()

Dispose(bool)

Disposes of the request message content

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True to dispose content