RequestHeaders Struct

Definition

Headers to be sent as part of the Request.

public struct RequestHeaders : System.Collections.Generic.IEnumerable<Azure.Core.HttpHeader>
type RequestHeaders = struct
    interface seq<HttpHeader>
    interface IEnumerable
Public Structure RequestHeaders
Implements IEnumerable(Of HttpHeader)
Inheritance
System.ValueType
RequestHeaders
Implements
System.Collections.Generic.IEnumerable<HttpHeader> System.Collections.IEnumerable

Methods

Add(HttpHeader)

Adds the HttpHeader instance to the collection.

Add(String, String)

Adds the header to the collection. If a header with this name already exist adds an additional value to the header values.

Contains(String)

Returns true if the headers is stored in the collection.

GetEnumerator()

Returns an enumerator that iterates through the RequestHeaders.

Remove(String)

Removes the header from the collection.

SetValue(String, String)

Sets the header value name. If a header with this name already exist replaces it's value.

TryGetValue(String, String)

Returns header value if the headers is stored in the collection. If the header has multiple values they are going to be joined with a comma.

TryGetValues(String, IEnumerable<String>)

Returns header values if the header is stored in the collection.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through the RequestHeaders.

Extension Methods

ToCommaSeparatedString<T>(IEnumerable<T>)

Converts the elements of a collection to strings and concatenates them into a comma-separated list, or returns null for null or empty collections.

Applies to