Sdílet prostřednictvím


Headers Class

Definition

Header implementation used for Request and Responses

public class Headers : System.Collections.IEnumerable
type Headers = class
    interface IEnumerable
Public Class Headers
Implements IEnumerable
Inheritance
Headers
Implements

Constructors

Headers()

Creates a new instance of Headers.

Properties

ActivityId

Gets the activity ID for the request from the Azure Cosmos DB service.

ContentLength

Gets the Content Length for the current content in the ResponseMessage.

ContentType

Gets the Content Type for the current content in the ResponseMessage.

ContinuationToken

Gets the Continuation Token in the current ResponseMessage.

ETag

Gets the entity tag associated with the resource from the Azure Cosmos DB service.

Item[String]

Gets the value of a particular header.

Location

Gets the Location for the current content in the ResponseMessage.

RequestCharge

Gets the request charge for this request from the Azure Cosmos DB service.

Session

Gets the Session Token for the current ResponseMessage.

Methods

Add(String, IEnumerable<String>)

Adds a header to the Header collection.

Add(String, String)

Adds a header to the Header collection.

AllKeys()

Obtains a list of all header names.

Get(String)

Gets the value of a particular header.

GetEnumerator()

Enumerates all the HTTP headers names in the Headers.

GetHeaderValue<T>(String)

Gets a header value with a particular type.

GetValueOrDefault(String)

Returns the header value or the default(string)

Remove(String)

Removes a header from the header collection.

Set(String, String)

Adds or updates a header in the Header collection.

TryGetValue(String, String)

Tries to get the value for a particular header.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Enumerates all the HTTP headers names in the Headers.

Applies to

See also