Inheritance
HeaderCollection
Assembly: Titanium.Web.Proxy.dll
[TypeConverter(typeof(ExpandableObjectConverter))]
public class HeaderCollection : IEnumerable<HttpHeader>, IEnumerable
Constructors
Declaration
public HeaderCollection()
Properties
Unique Request header collection
Declaration
public ReadOnlyDictionary<string, HttpHeader> Headers { get; }
Property Value
Declaration
public ReadOnlyDictionary<string, List<HttpHeader>> NonUniqueHeaders { get; }
Property Value
Methods
Add a new header with given name and value
Declaration
public void AddHeader(string name, string value)
Parameters
Adds the given header object to Request
Declaration
public void AddHeader(HttpHeader newHeader)
Parameters
Adds the given header objects to Request
Declaration
public void AddHeaders(IEnumerable<KeyValuePair<string, string>> newHeaders)
Parameters
Adds the given header objects to Request
Declaration
public void AddHeaders(IEnumerable<KeyValuePair<string, HttpHeader>> newHeaders)
Parameters
Adds the given header objects to Request
Declaration
public void AddHeaders(IEnumerable<HttpHeader> newHeaders)
Parameters
Declaration
Declaration
public List<HttpHeader> GetAllHeaders()
Returns
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<HttpHeader> GetEnumerator()
Returns
| Type |
Description |
| IEnumerator<HttpHeader> |
An enumerator that can be used to iterate through the collection.
|
Declaration
public HttpHeader GetFirstHeader(string name)
Parameters
| Type |
Name |
Description |
| String |
name |
|
Returns
Returns all headers with given name if exists
Returns null if does'nt exist
Declaration
public List<HttpHeader> GetHeaders(string name)
Parameters
| Type |
Name |
Description |
| String |
name |
|
Returns
Declaration
public bool HeaderExists(string name)
Parameters
| Type |
Name |
Description |
| String |
name |
|
Returns
removes all headers with given name
Declaration
public bool RemoveHeader(string headerName)
Parameters
| Type |
Name |
Description |
| String |
headerName |
|
Returns
| Type |
Description |
| Boolean |
True if header was removed
False if no header exists with given name
|
Removes given header object if it exist
Declaration
public bool RemoveHeader(HttpHeader header)
Parameters
| Type |
Name |
Description |
| HttpHeader |
header |
Returns true if header exists and was removed
|
Returns
Explicit Interface Implementations
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements