<PackageReference Include="Azure.Core" Version="1.47.1" />

DictionaryHeaders

An implementation for manipulating headers on Request.

Initializes an instance of DictionaryHeaders

public void AddHeader(string name, string value)

Adds a header value to the header collection.

public bool ContainsHeader(string name)

Returns true if the header is stored in the collection.

Returns an iterator enumerating HttpHeader in the request.

public bool RemoveHeader(string name)

Removes the header from the collection.

public void SetHeader(string name, string value)

Sets a header value the header collection.

public bool TryGetHeader(string name, out string value)

Returns header value if the header is stored in the collection. If the header has multiple values they are going to be joined with a comma.

public bool TryGetHeaderValues(string name, out IEnumerable values)

Returns header values if the header is stored in the collection.