HttpHeaders.Add Method (String, String)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Adds the specified header and its value into the HttpHeaders collection.

Namespace:  System.Net.Http.Headers
Assembly:  System.Net.Http (in System.Net.Http.dll)

public void Add(
	string name,
	string value


Type: System.String
The header to add to the collection.
Type: System.String
The content of the header.

The header value will be parsed and validated.

If the specified header does not exist, the Add(String, String) method inserts a new header into the list of header name/value pairs.

If the specified header is already present, value is added to the comma-separated list of values associated with the header.