Ejemplo n.º 1
0
 /// <summary>
 /// Adds content header to the built HTTP request message.
 /// </summary>
 /// <param name="name">Name of the header.</param>
 /// <param name="values">Collection of values for the header.</param>
 /// <returns>The same HTTP request message builder.</returns>
 public IAndHttpRequestMessageBuilder WithContentHeader(string name, IEnumerable <string> values)
 {
     HttpRequestMessageValidator.ValidateContent(this.requestMessage);
     this.requestMessage.Content.Headers.Add(name, values);
     return(this);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Add HTTP content header to the built route test.
 /// </summary>
 /// <param name="name">Name of the content header.</param>
 /// <param name="value">Value of the content header.</param>
 /// <returns>The same route test builder.</returns>
 public IAndShouldMapTestBuilder WithContentHeader(string name, string value)
 {
     HttpRequestMessageValidator.ValidateContent(this.requestMessage);
     this.requestMessage.Content.Headers.Add(name, value);
     return(this);
 }