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

RequestHeaders

Headers to be sent as part of the Request.
public void Add(HttpHeader header)

Adds the HttpHeader instance to the collection.

public void Add(string name, string value)

Adds the header to the collection. If a header with this name already exist adds an additional value to the header values.

public bool Contains(string name)

Returns true if the headers is stored in the collection.

Returns an enumerator that iterates through the RequestHeaders.

public bool Remove(string name)

Removes the header from the collection.

public void SetValue(string name, string value)

Sets the header value name. If a header with this name already exist replaces it's value.

public bool TryGetValue(string name, out string value)

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

public bool TryGetValues(string name, out IEnumerable values)

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