一款简单易用的基础网络通讯组件库。

IHttpHeader 接口

表示HTTP头部的接口,继承自IDictionaryTKey, TValue,用于管理HTTP头部键值对。

Definition

命名空间: TouchSocket.Http
程序集: TouchSocket.Http (在 TouchSocket.Http.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
public interface IHttpHeader : IDictionary<string, string>, 
	ICollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, 
	IEnumerable
Implements
ICollectionKeyValuePairString, String, IDictionaryString, String, IEnumerableKeyValuePairString, String, IEnumerable

属性

CountGets the number of elements contained in the ICollectionT.
(继承自 ICollectionKeyValuePairString, String。)
IsReadOnlyGets a value indicating whether the ICollectionT is read-only.
(继承自 ICollectionKeyValuePairString, String。)
ItemGets or sets the element with the specified key.
(继承自 IDictionaryString, String。)
KeysGets an ICollectionT containing the keys of the IDictionaryTKey, TValue.
(继承自 IDictionaryString, String。)
ValuesGets an ICollectionT containing the values in the IDictionaryTKey, TValue.
(继承自 IDictionaryString, String。)

方法

Add(T)Adds an item to the ICollectionT.
(继承自 ICollectionKeyValuePairString, String。)
Add(TKey, TValue)Adds an element with the provided key and value to the IDictionaryTKey, TValue.
(继承自 IDictionaryString, String。)
ClearRemoves all items from the ICollectionT.
(继承自 ICollectionKeyValuePairString, String。)
Contains(T)Determines whether the ICollectionT contains a specific value.
(继承自 ICollectionKeyValuePairString, String。)
Contains(String, String, Boolean) 判断指定键的值是否等于指定值。
ContainsKeyDetermines whether the IDictionaryTKey, TValue contains an element with the specified key.
(继承自 IDictionaryString, String。)
CopyToCopies the elements of the ICollectionT to an Array, starting at a particular Array index.
(继承自 ICollectionKeyValuePairString, String。)
Get 获取指定键的Header值。
GetEnumeratorReturns an enumerator that iterates through the collection.
(继承自 IEnumerableKeyValuePairString, String。)
Remove(T)Removes the first occurrence of a specific object from the ICollectionT.
(继承自 ICollectionKeyValuePairString, String。)
Remove(TKey)Removes the element with the specified key from the IDictionaryTKey, TValue.
(继承自 IDictionaryString, String。)
TryGetValueGets the value associated with the specified key.
(继承自 IDictionaryString, String。)

扩展方法

ForEachKeyValuePairString, String 循环遍历每个元素,执行Action动作
(由 CollectionsExtension 定义。)
ForEachAsyncKeyValuePairString, String 循环遍历每个元素,执行异步动作
(由 CollectionsExtension 定义。)
GetSafeEnumeratorKeyValuePairString, String 获取安全的枚举器。
(由 SystemExtension 定义。)

参见