Class Header
Represents a container for HTTP headers, providing functionality for adding and retrieving headers.
public class Header
- Inheritance
-
Header
- Inherited Members
Methods
Add(Dictionary<string, string>)
Adds multiple headers to the collection or updates the values of existing headers. Key will be lowercased
public void Add(Dictionary<string, string> headers)
Parameters
headersDictionary<string, string>A dictionary containing the headers to add or update, where the key is the header name and the value is the header value.
Add(string, string)
Adds a new header to the collection or updates the value of an existing header. Key will be lowercased
public void Add(string key, string value)
Parameters
keystringThe key of the header to add or update.
valuestringThe value associated with the header key.
Get()
Retrieves all the headers in the collection.
public Dictionary<string, string> Get()
Returns
- Dictionary<string, string>
A dictionary containing all headers, where the key is the header name and the value is the header value.