HttpHeaders Class

Definition

A collection of headers and their values as defined in RFC 2616.

public ref class HttpHeaders abstract : System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Collections::Generic::IEnumerable<System::String ^> ^>>
public abstract class HttpHeaders : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Collections.Generic.IEnumerable<string>>>
type HttpHeaders = class
    interface seq<KeyValuePair<string, seq<string>>>
    interface IEnumerable
Public MustInherit Class HttpHeaders
Implements IEnumerable(Of KeyValuePair(Of String, IEnumerable(Of String)))
Inheritance
HttpHeaders
Derived
Implements

Constructors

HttpHeaders()

Initializes a new instance of the HttpHeaders class.

Methods

Add(String, IEnumerable<String>)

Adds the specified header and its values into the HttpHeaders collection.

Add(String, String)

Adds the specified header and its value into the HttpHeaders collection.

Clear()

Removes all headers from the HttpHeaders collection.

Contains(String)

Returns if a specific header exists in the HttpHeaders collection.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Returns an enumerator that can iterate through the HttpHeaders instance.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetValues(String)

Returns all header values for a specified header stored in the HttpHeaders collection.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(String)

Removes the specified header from the HttpHeaders collection.

ToString()

Returns a string that represents the current HttpHeaders object.

TryAddWithoutValidation(String, IEnumerable<String>)

Returns a value that indicates whether the specified header and its values were added to the HttpHeaders collection without validating the provided information.

TryAddWithoutValidation(String, String)

Returns a value that indicates whether the specified header and its value were added to the HttpHeaders collection without validating the provided information.

TryGetValues(String, IEnumerable<String>)

Return if a specified header and specified values are stored in the HttpHeaders collection.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Gets an enumerator that can iterate through a HttpHeaders.

Extension Methods

CopyToDataTable<T>(IEnumerable<T>)

Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

Removes every node in the source collection from its parent node.

Applies to