public AddHeader ( string key, string value ) : IRestClient | ||
key | string | The key of the header. |
value | string | The value of the header. |
return | IRestClient |
public virtual IRestClient AddHeader(string key, string value)
{
Contract.Requires(!string.IsNullOrWhiteSpace(key), "The key cannot be null or empty.");
Contract.Requires(!string.IsNullOrWhiteSpace(value), "The value cannot be null or empty.");
foreach (var httpRequestMessage in httpRequestMessageList)
{
httpRequestMessage.Headers.Add(key, value);
}
return this;
}