Class ResponseHeaderCollection
Contains protocol headers associated with an HTTP response.
Unlike
The restricted headers are the following:
| Header name | Rationale |
|---|---|
|
| These headers are automatically managed by EmbedIO. |
|
| Cookies are set through the Cookies property. |
|
| These headers are only meant to be included in HTTP requests, not in responses. |
|
| These headers are only meant to be sent by proxies, not servers. |
Namespace: EmbedIO.Net
Syntax
public sealed class ResponseHeaderCollection : NameValueCollection
Properties
AllKeys
Declaration
public override string[] AllKeys { get; }
Property Value
| Type | Description |
|---|---|
| String[] |
Count
Declaration
public override int Count { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Keys
Declaration
public override KeysCollection Keys { get; }
Property Value
| Type | Description |
|---|---|
| KeysCollection |
Methods
Add(String, String)
Declaration
public override void Add(string name, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | |
| String | value |
Clear()
Declaration
public override void Clear()
Get(Int32)
Declaration
public override string Get(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index |
Returns
| Type | Description |
|---|---|
| String |
Get(String)
Declaration
public override string Get(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name |
Returns
| Type | Description |
|---|---|
| String |
GetEnumerator()
Declaration
public override IEnumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 |
GetKey(Int32)
Declaration
public override string GetKey(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index |
Returns
| Type | Description |
|---|---|
| String |
GetObjectData(SerializationInfo, StreamingContext)
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializationInfo | info | |
| StreamingContext | context |
GetValues(Int32)
Declaration
public override string[] GetValues(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index |
Returns
| Type | Description |
|---|---|
| String[] |
GetValues(String)
Declaration
public override string[] GetValues(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name |
Returns
| Type | Description |
|---|---|
| String[] |
IsRestrictedName(String)
Determines whether a specified header name is restricted, i.e. its value cannot be read or set through a ResponseHeaderCollection.
See the documentation for ResponseHeaderCollection for a list of restricted header names.
Declaration
public static bool IsRestrictedName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The header name to test. |
Returns
| Type | Description |
|---|---|
| Boolean | true if |
OnDeserialization(Object)
Declaration
public override void OnDeserialization(object sender)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | sender |
Remove(String)
Declaration
public override void Remove(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name |
Set(String, String)
Declaration
public override void Set(string name, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | |
| String | value |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String |