Share via


IHeaderDictionary Interface

Definition

Represents HttpRequest and HttpResponse headers

public interface class IHeaderDictionary : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::String ^, Microsoft::Extensions::Primitives::StringValues>>, System::Collections::Generic::IDictionary<System::String ^, Microsoft::Extensions::Primitives::StringValues>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, Microsoft::Extensions::Primitives::StringValues>>
public interface IHeaderDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,Microsoft.Extensions.Primitives.StringValues>>, System.Collections.Generic.IDictionary<string,Microsoft.Extensions.Primitives.StringValues>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Microsoft.Extensions.Primitives.StringValues>>
type IHeaderDictionary = interface
    interface IDictionary<string, StringValues>
    interface ICollection<KeyValuePair<string, StringValues>>
    interface seq<KeyValuePair<string, StringValues>>
    interface IEnumerable
type IHeaderDictionary = interface
    interface ICollection<KeyValuePair<string, StringValues>>
    interface seq<KeyValuePair<string, StringValues>>
    interface IEnumerable
    interface IDictionary<string, StringValues>
Public Interface IHeaderDictionary
Implements ICollection(Of KeyValuePair(Of String, StringValues)), IDictionary(Of String, StringValues), IEnumerable(Of KeyValuePair(Of String, StringValues))
Derived
Implements

Properties

Accept

Gets or sets the Accept HTTP header.

AcceptCharset

Gets or sets the Accept-Charset HTTP header.

AcceptEncoding

Gets or sets the Accept-Encoding HTTP header.

AcceptLanguage

Gets or sets the Accept-Language HTTP header.

AcceptRanges

Gets or sets the Accept-Ranges HTTP header.

AccessControlAllowCredentials

Gets or sets the Access-Control-Allow-Credentials HTTP header.

AccessControlAllowHeaders

Gets or sets the Access-Control-Allow-Headers HTTP header.

AccessControlAllowMethods

Gets or sets the Access-Control-Allow-Methods HTTP header.

AccessControlAllowOrigin

Gets or sets the Access-Control-Allow-Origin HTTP header.

AccessControlExposeHeaders

Gets or sets the Access-Control-Expose-Headers HTTP header.

AccessControlMaxAge

Gets or sets the Access-Control-Max-Age HTTP header.

AccessControlRequestHeaders

Gets or sets the Access-Control-Request-Headers HTTP header.

AccessControlRequestMethod

Gets or sets the Access-Control-Request-Method HTTP header.

Age

Gets or sets the Age HTTP header.

Allow

Gets or sets the Allow HTTP header.

AltSvc

Gets or sets the Alt-Svc HTTP header.

Authorization

Gets or sets the Authorization HTTP header.

Baggage

Gets or sets the baggage HTTP header.

CacheControl

Gets or sets the Cache-Control HTTP header.

Connection

Gets or sets the Connection HTTP header.

ContentDisposition

Gets or sets the Content-Disposition HTTP header.

ContentEncoding

Gets or sets the Content-Encoding HTTP header.

ContentLanguage

Gets or sets the Content-Language HTTP header.

ContentLength

Strongly typed access to the Content-Length header. Implementations must keep this in sync with the string representation.

ContentLocation

Gets or sets the Content-Location HTTP header.

ContentMD5

Gets or sets the Content-MD5 HTTP header.

ContentRange

Gets or sets the Content-Range HTTP header.

ContentSecurityPolicy

Gets or sets the Content-Security-Policy HTTP header.

ContentSecurityPolicyReportOnly

Gets or sets the Content-Security-Policy-Report-Only HTTP header.

ContentType

Gets or sets the Content-Type HTTP header.

Cookie

Gets or sets the Cookie HTTP header.

CorrelationContext

Gets or sets the Correlation-Context HTTP header.

Date

Gets or sets the Date HTTP header.

ETag

Gets or sets the ETag HTTP header.

Expect

Gets or sets the Expect HTTP header.

Expires

Gets or sets the Expires HTTP header.

From

Gets or sets the From HTTP header.

GrpcAcceptEncoding

Gets or sets the Grpc-Accept-Encoding HTTP header.

GrpcEncoding

Gets or sets the Grpc-Encoding HTTP header.

GrpcMessage

Gets or sets the Grpc-Message HTTP header.

GrpcStatus

Gets or sets the Grpc-Status HTTP header.

GrpcTimeout

Gets or sets the Grpc-Timeout HTTP header.

Host

Gets or sets the Host HTTP header.

IfMatch

Gets or sets the If-Match HTTP header.

IfModifiedSince

Gets or sets the If-Modified-Since HTTP header.

IfNoneMatch

Gets or sets the If-None-Match HTTP header.

IfRange

Gets or sets the If-Range HTTP header.

IfUnmodifiedSince

Gets or sets the If-Unmodified-Since HTTP header.

Item[String]

IHeaderDictionary has a different indexer contract than IDictionary, where it will return StringValues.Empty for missing entries.

KeepAlive

Gets or sets the Keep-Alive HTTP header.

LastModified

Gets or sets the Last-Modified HTTP header.

Link

Gets or sets the Link HTTP header.

Location

Gets or sets the Location HTTP header.

MaxForwards

Gets or sets the Max-Forwards HTTP header.

Origin

Gets or sets the Origin HTTP header.

Pragma

Gets or sets the Pragma HTTP header.

ProxyAuthenticate

Gets or sets the Proxy-Authenticate HTTP header.

ProxyAuthorization

Gets or sets the Proxy-Authorization HTTP header.

ProxyConnection

Gets or sets the Proxy-Connection HTTP header.

Range

Gets or sets the Range HTTP header.

Referer

Gets or sets the Referer HTTP header.

RequestId

Gets or sets the Request-Id HTTP header.

RetryAfter

Gets or sets the Retry-After HTTP header.

SecWebSocketAccept

Gets or sets the Sec-WebSocket-Accept HTTP header.

SecWebSocketExtensions

Gets or sets the Sec-WebSocket-Extensions HTTP header.

SecWebSocketKey

Gets or sets the Sec-WebSocket-Key HTTP header.

SecWebSocketProtocol

Gets or sets the Sec-WebSocket-Protocol HTTP header.

SecWebSocketVersion

Gets or sets the Sec-WebSocket-Version HTTP header.

Server

Gets or sets the Server HTTP header.

SetCookie

Gets or sets the Set-Cookie HTTP header.

StrictTransportSecurity

Gets or sets the Strict-Transport-Security HTTP header.

TE

Gets or sets the TE HTTP header.

TraceParent

Gets or sets the traceparent HTTP header.

TraceState

Gets or sets the tracestate HTTP header.

Trailer

Gets or sets the Trailer HTTP header.

TransferEncoding

Gets or sets the Transfer-Encoding HTTP header.

Translate

Gets or sets the Translate HTTP header.

Upgrade

Gets or sets the Upgrade HTTP header.

UpgradeInsecureRequests

Gets or sets the Upgrade-Insecure-Requests HTTP header.

UserAgent

Gets or sets the User-Agent HTTP header.

Vary

Gets or sets the Vary HTTP header.

Via

Gets or sets the Via HTTP header.

Warning

Gets or sets the Warning HTTP header.

WebSocketSubProtocols

Gets or sets the Sec-WebSocket-Protocol HTTP header.

WWWAuthenticate

Gets or sets the WWW-Authenticate HTTP header.

XContentTypeOptions

Gets or sets the X-Content-Type-Options HTTP header.

XFrameOptions

Gets or sets the X-Frame-Options HTTP header.

XPoweredBy

Gets or sets the X-Powered-By HTTP header.

XRequestedWith

Gets or sets the X-Requested-With HTTP header.

XUACompatible

Gets or sets the X-UA-Compatible HTTP header.

XXSSProtection

Gets or sets the X-XSS-Protection HTTP header.

Extension Methods

Append(IHeaderDictionary, String, StringValues)

Add new values. Each item remains a separate array entry.

AppendCommaSeparatedValues(IHeaderDictionary, String, String[])

Quotes any values containing commas, and then comma joins all of the values with any existing values.

GetCommaSeparatedValues(IHeaderDictionary, String)

Get the associated values from the collection separated into individual values. Quoted values will not be split, and the quotes will be removed.

SetCommaSeparatedValues(IHeaderDictionary, String, String[])

Quotes any values containing commas, and then comma joins all of the values.

AppendList<T>(IHeaderDictionary, String, IList<T>)

Appends a sequence of values to IHeaderDictionary.

Applies to