Class PipelineRequestHeaders
Represents the collection of HTTP headers on a PipelineRequest.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: System.ClientModel.dll
Syntax
[System.Runtime.CompilerServices.Nullable(0)]
[System.Runtime.CompilerServices.NullableContext(1)]
public abstract class PipelineRequestHeaders : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>
Constructors
PipelineRequestHeaders()
Declaration
protected PipelineRequestHeaders ();
Methods
Add(String, String)
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.
Declaration
public abstract void Add (string name, string value);
Parameters
System.String
name
The name of the header to add. |
System.String
value
The value of the header. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public abstract System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,string>> GetEnumerator ();
Returns
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String,System.String>>
An enumerator that can be used to iterate through the collection. |
Remove(String)
Removes the specified header from the request's header collection.
Declaration
public abstract bool Remove (string name);
Parameters
System.String
name
The name of the header to remove. |
Returns
System.Boolean
|
Set(String, String)
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.
Declaration
public abstract void Set (string name, string value);
Parameters
System.String
name
The name of the header to set. |
System.String
value
The value of the header. |
TryGetValue(String, String)
Attempts to retrieve the value associated with the specified header name.
Declaration
public abstract bool TryGetValue (string name, out string value);
Parameters
System.String
name
The name of the header to retrieve. |
System.String
value
The specified header value. |
Returns
System.Boolean
|
TryGetValues(String, IEnumerable<String>)
Attempts to retrieve the values associated with the specified header name.
Declaration
public abstract bool TryGetValues (string name, out System.Collections.Generic.IEnumerable<string> values);
Parameters
System.String
name
The name of the header to retrieve. |
System.Collections.Generic.IEnumerable<System.String>
values
The specified header values. |
Returns
System.Boolean
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
System.Collections.IEnumerator IEnumerable.GetEnumerator ();
Returns
System.Collections.IEnumerator
An System.Collections.IEnumerator object that can be used to iterate through the collection. |