Amido.Testing.WebApi.WebApiRequest.AddHeader C# (CSharp) Method

AddHeader() public method

Add a header to the request.
public AddHeader ( string key, string value ) : WebApiRequest
key string The key of the header.
value string The value of the header.
return WebApiRequest
        public WebApiRequest 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.");
            
            headers.Add(key, value);
            return this;
        }