Table of Contents

Class HttpHeaderCollection

Namespace
Sisk.Core.Entity
Assembly
Sisk.Core.dll

Represents an collection of HTTP headers with their name and values.

public sealed class HttpHeaderCollection : StringKeyStore, IDictionary<string, string[]>, ICollection<KeyValuePair<string, string[]>>, IEnumerable<KeyValuePair<string, string[]>>, IEnumerable
Inheritance
HttpHeaderCollection
Implements
Inherited Members

Constructors

HttpHeaderCollection()

Create an new instance of the HttpHeaderCollection class.

Properties

Accept

Gets the value of the HTTP Accept header.

Specifies the media types that are acceptable for the response, allowing the client to indicate its preferences.

AcceptCharset

Gets the value of the HTTP Accept-Charset header.

Indicates the character sets that are acceptable for the response, allowing the client to specify its preferred encoding.

AcceptEncoding

Gets the value of the HTTP Accept-Encoding header.

Specifies the content encodings that are acceptable for the response, allowing the client to indicate its preferences for compression.

AcceptLanguage

Gets the value of the HTTP Accept-Language header.

Indicates the natural languages that are preferred for the response, allowing the client to specify its language preferences.

AcceptPatch

Gets the value of the HTTP Accept-Patch header.

Indicates the patch document formats that are acceptable for the response, allowing the client to specify its preferences for patching resources.

AcceptRanges

Gets or sets the value of the HTTP Accept-Ranges header.

Indicates that the server supports range requests for the resource, allowing clients to request specific byte ranges.

AccessControlAllowCredentials

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

Indicates whether the response to the request can expose credentials, allowing cross-origin requests to include credentials.

AccessControlAllowHeaders

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

Specifies which headers can be used when making the actual request in a cross-origin resource sharing (CORS) context.

AccessControlAllowMethods

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

Specifies the methods that are allowed when accessing the resource in a CORS context.

AccessControlAllowOrigin

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

Specifies which origins are allowed to access the resource in a CORS context, helping to control cross-origin requests.

AccessControlExposeHeaders

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

Indicates which headers can be exposed as part of the response to a cross-origin request.

AccessControlMaxAge

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

Specifies how long the results of a preflight request can be cached, reducing the number of preflight requests made.

Age

Gets or sets the value of the HTTP Age header.

Indicates the age of the object in a cache, helping clients understand how fresh the cached response is.

Allow

Gets or sets the value of the HTTP Allow header.

Lists the HTTP methods that are supported by the resource, informing clients about the available actions.

Authorization

Gets or sets the value of the HTTP Authorization header.

Contains credentials for authenticating the client with the server, often used for basic or bearer token authentication.

CacheControl

Gets or sets the value of the HTTP Cache-Control header.

Directs caching mechanisms on how to cache the response, including directives for expiration and revalidation.

Connection

Gets the value of the HTTP Connection header. To set this header in a HTTP response, use the KeepAlive property.

ContentDisposition

Gets or sets the value of the HTTP Content-Disposition header.

Indicates if the content should be displayed inline in the browser or treated as an attachment to be downloaded.

ContentEncoding

Gets or sets the value of the HTTP Content-Encoding header.

Specifies the encoding transformations that have been applied to the response body, such as gzip or deflate. This header should not be interpreted as the content text charset.

ContentLanguage

Gets or sets the value of the HTTP Content-Language header.

Indicates the natural language(s) of the intended audience for the response, helping clients understand the content's language.

ContentLocation

Gets or sets the value of the HTTP Content-Location header.

Indicates an alternate location for the returned data, often used for redirecting clients to a different resource.

ContentMD5

Gets or sets the value of the HTTP Content-MD5 header.

Contains the MD5 hash of the response body in an base-64 format, allowing clients to verify the integrity of the received data.

ContentRange

Gets or sets the value of the HTTP Content-Range header.

Indicates the size of the response body in bytes, allowing the client to know how much data to expect.

ContentSecurityPolicy

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

Defines security policies for the content, helping to prevent cross-site scripting (XSS) and other code injection attacks.

ContentType

Gets or sets the value of the HTTP Content-Type header.

Indicates the media type of the resource, allowing the client to understand how to process the response body.

Cookie

Gets the value of the HTTP Cookie header.

Contains stored HTTP cookies previously sent by the server, allowing the server to identify the client on subsequent requests.

ETag

Gets or sets the value of the HTTP ETag header.

Provides a unique identifier for a specific version of a resource, allowing clients to cache and validate resources efficiently.

Expect

Gets the value of the HTTP Expect header.

Indicates that the client expects certain behaviors from the server, such as support for specific features or conditions.

Expires

Gets or sets the value of the HTTP Expires header.

Indicates the date and time after which the response is considered stale, helping clients manage caching.

Host

Gets the value of the HTTP Host header.

Specifies the domain name of the server and the TCP port number on which the server is listening, allowing for virtual hosting.

IfMatch

Gets the value of the HTTP If-Match header.

Used to make a conditional request, allowing the client to specify that the request should only be processed if the resource matches the given ETag.

IfModifiedSince

Gets the value of the HTTP If-Modified-Since header.

Used to make a conditional request, allowing the client to specify that the resource should only be returned if it has been modified since the given date.

IfNoneMatch

Gets the value of the HTTP If-None-Match header.

Used to make a conditional request, allowing the client to specify that the resource should only be returned if it has been modified since the given date.

IfRange

Gets the value of the HTTP If-Range header.

Used to make a conditional range request, allowing the client to specify that the range should only be returned if the resource has not changed.

IfUnmodifiedSince

Gets the value of the HTTP If-Unmodified-Since header.

Used to make a conditional request, allowing the client to specify that the resource should only be returned if it has not been modified since the given date.

Location

Gets or sets the value of the HTTP Location header.

Indicates an alternate location for the returned data, often used for redirecting clients to a different resource.

MaxForwards

Gets or sets the value of the HTTP Max-Forwards header.

Used in OPTIONS requests to limit the number of times the request can be forwarded by proxies.

Origin

Gets the value of the HTTP Origin header.

Indicates the origin of the request, helping servers implement CORS and manage cross-origin requests.

Pragma

Gets or sets the value of the HTTP Pragma header.

Used to include implementation-specific directives that might apply to any recipient along the request/response chain.

ProxyAuthenticate

Gets or sets the value of the HTTP Proxy-Authenticate header.

Used by a proxy server to request authentication from the client, indicating the authentication method required.

ProxyAuthorization

Gets or sets the value of the HTTP Proxy-Authorization header.

Contains credentials for authenticating the client with a proxy server, allowing access to the requested resource.

Range

Gets the value of the HTTP Range header.

Used to request a specific range of bytes from a resource, allowing clients to download large files in parts.

Referer

Gets the value of the HTTP Referer header.

Indicates the URL of the resource from which the request originated, helping servers understand the source of traffic.

RetryAfter

Gets or sets the value of the HTTP Retry-After header.

Indicates how long the client should wait before making a follow-up request, often used in rate limiting scenarios.

SetCookie

Gets or sets the value of the HTTP Set-Cookie header.

Used to send cookies from the server to the client, allowing the server to store state information on the client.

TE

Gets the value of the HTTP TE header.

Indicates the transfer encodings that are acceptable for the response, allowing for content negotiation.

UserAgent

Gets the value of the HTTP User-Agent header.

Contains information about the user agent (browser or application) making the request, including its version and platform.

Vary

Gets or sets the value of the HTTP Vary header.

Indicates that the response varies based on the value of the specified request headers, allowing for content negotiation.

Via

Gets or sets the value of the HTTP Via header.

Used to track message forwards and proxies, indicating the intermediate protocols and recipients involved in the request/response chain.

WWWAuthenticate

Gets or sets the value of the HTTP WWW-Authenticate header.

Used in response to a request for authentication, indicating the authentication method that should be used to access the resource.

XForwardedFor

Gets the value of the HTTP X-Forwarded-For header.

Used to identify the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer.

XForwardedHost

Gets the value of the HTTP X-Forwarded-Host header

Used to identify the original host requested by the client in the Host HTTP request header, often used in proxy setups.

XFrameOptions

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

Used to control whether a browser should be allowed to render a page in a iframe, frame, embed or object tag, helping to prevent clickjacking attacks.

XUACompatible

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

Used to specify the document mode that Internet Explorer should use to render the page, helping to ensure compatibility with older versions.