<PackageReference Include="System.ClientModel" Version="1.7.0" />

PipelineRequestHeaders

public abstract class PipelineRequestHeaders : IEnumerable<KeyValuePair<string, string>>, IEnumerable
Represents the collection of HTTP headers on a PipelineRequest.

public abstract void Add(string name, string value)

Adds the specified header and its value to the request's header collection. If a header with this name is already present in the collection, the value will be added to the comma-separated list of values associated with the header.

public abstract IEnumerator<KeyValuePair<string, string>> GetEnumerator()

Returns an enumerator that iterates through the collection.

public abstract bool Remove(string name)

Removes the specified header from the request's header collection.

public abstract void Set(string name, string value)

Sets the specified header and its value in the request's header collection. If a header with this name is already present in the collection, the header's value will be replaced with the specified value.

public abstract bool TryGetValue(string name, out string value)

Attempts to retrieve the value associated with the specified header name.

public abstract bool TryGetValues(string name, out IEnumerable values)

Attempts to retrieve the values associated with the specified header name.