Sisk

Class

HttpHeaderCollection

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

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

C#
public sealed class HttpHeaderCollection : StringKeyStoreCollection, IDictionary<string, string[]>, ICollection<KeyValuePair<string, string[]>>, IEnumerable<KeyValuePair<string, string[]>>, IEnumerable

Inheritance #

object ← StringKeyStoreCollection ← HttpHeaderCollection

Implements #

IDictionary<string, string[]>, ICollection<KeyValuePair<string, string[]>>, IEnumerable<KeyValuePair<string, string[]>>, IEnumerable

Inherited Members #

StringKeyStoreCollection.FromQueryString(string), StringKeyStoreCollection.FromCookieString(string), StringKeyStoreCollection.FromNameValueCollection(NameValueCollection), StringKeyStoreCollection.ImportNameValueCollection(NameValueCollection), StringKeyStoreCollection.ImportQueryString(string), StringKeyStoreCollection.ImportCookieString(string), StringKeyStoreCollection.Add(string, string[]), StringKeyStoreCollection.Add(string, IEnumerable<string>), StringKeyStoreCollection.Add(string, string), StringKeyStoreCollection.Add(KeyValuePair<string, string[]>), StringKeyStoreCollection.AddRange(IEnumerable<KeyValuePair<string, string[]>>), StringKeyStoreCollection.AddRange(IEnumerable<KeyValuePair<string, string?>>), StringKeyStoreCollection.SetRange(IEnumerable<KeyValuePair<string, string[]>>), StringKeyStoreCollection.Set(KeyValuePair<string, string[]>), StringKeyStoreCollection.Set(string, string), StringKeyStoreCollection.Set(string, IEnumerable<string>), StringKeyStoreCollection.GetValue(string), StringKeyStoreCollection.GetValues(string), StringKeyStoreCollection.Clear(), StringKeyStoreCollection.Remove(string), StringKeyStoreCollection.MakeReadOnly(), StringKeyStoreCollection.ContainsKey(string), StringKeyStoreCollection.GetEnumerator(), StringKeyStoreCollection.TryGetValue(string, out string[]), StringKeyStoreCollection.AsDictionary(), StringKeyStoreCollection.AsNameValueCollection(), StringKeyStoreCollection.AsStringValueCollection(), StringKeyStoreCollection.ToString(), StringKeyStoreCollection.ToString(IFormatProvider?), StringKeyStoreCollection.Comparer, StringKeyStoreCollection.this[string], StringKeyStoreCollection.Keys, StringKeyStoreCollection.Values, StringKeyStoreCollection.Count, StringKeyStoreCollection.IsReadOnly, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors #

NameDescription
HttpHeaderCollection()Create an new instance of the HttpHeaderCollection class.
HttpHeaderCollection(IDictionary<string, string[]>)Create an new instance of the HttpHeaderCollection class with values from another collection.
HttpHeaderCollection(IDictionary<string, string?>)Create an new instance of the HttpHeaderCollection class with values from another collection.
HttpHeaderCollection(WebHeaderCollection)Create an new instance of the HttpHeaderCollection class with values from another collection.

Properties #

NameDescription
AcceptGets the value of the HTTP Accept header. Specifies the media types that are acceptable for the response, allowing the client to indicate its preferences.
AcceptCHGets or sets the value of the HTTP Accept-CH header. Specifies the client hints that the server supports, allowing clients to provide additional information about their capabilities.
AcceptCharsetGets 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.
AcceptEncodingGets 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.
AcceptLanguageGets 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.
AcceptPatchGets 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.
AcceptPostGets or sets the value of the HTTP Accept-Post header. Specifies the accepted formats for posting data to the server.
AcceptQueryGets or sets the value of the HTTP Accept-Query header. Specifies the accepted formats for querying data from the server.
AcceptRangesGets 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.
AccessControlAllowCredentialsGets 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.
AccessControlAllowHeadersGets 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.
AccessControlAllowMethodsGets 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.
AccessControlAllowOriginGets 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.
AccessControlExposeHeadersGets 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.
AccessControlMaxAgeGets 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.
AgeGets 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.
AllowGets 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.
AuthorizationGets 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.
CacheControlGets 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.
ConnectionGets the value of the HTTP Connection header. To set this header in a HTTP response, use the KeepAlive property.
ContentDispositionGets 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.
ContentEncodingGets 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.
ContentLanguageGets 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.
ContentLocationGets 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.
ContentMD5Gets 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.
ContentRangeGets 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.
ContentSecurityPolicyGets 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.
ContentTypeGets 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.
CookieGets 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.
DntGets the value of the HTTP DNT header. The HTTP DNT (Do Not Track) request header indicates the user’s tracking preference.
ETagGets 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.
ExpectGets 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.
ExpiresGets 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.
HostGets 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.
IfMatchGets 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.
IfModifiedSinceGets 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.
IfNoneMatchGets 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.
IfRangeGets 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.
IfUnmodifiedSinceGets 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.
LocationGets 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.
MaxForwardsGets 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.
OriginGets the value of the HTTP Origin header. Indicates the origin of the request, helping servers implement CORS and manage cross-origin requests.
PragmaGets 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.
ProxyAuthenticateGets 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.
ProxyAuthorizationGets 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.
RangeGets 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.
RefererGets 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.
RetryAfterGets 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.
SecGPCGets the value of the HTTP Sec-GPC header. The HTTP Sec-GPC request header is part of the Global Privacy Control (GPC) mechanism to indicate whether the user consents to a website or service selling or sharing their personal information with third parties.
SetCookieGets 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.
TEGets the value of the HTTP TE header. Indicates the transfer encodings that are acceptable for the response, allowing for content negotiation.
UserAgentGets 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.
VaryGets 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.
ViaGets 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.
WWWAuthenticateGets 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.
XForwardedForGets 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.
XForwardedHostGets 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.
XFrameOptionsGets 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.
XUACompatibleGets 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.

Type to search the documentation and the API reference.