GetHeader() public method

Returns the first value of the given header or null if the header does not exist
public GetHeader ( string key ) : string
key string
return string
Esempio n. 1
0
 public void ItFormatsTheCookieExpirationDataAccordinglyToRfc2109()
 {
     var response = new Response();
     response.SetCookie("foo", new Response.Cookie { Value = "bar", Expires = new DateTime(1971, 10, 14, 12, 34, 56) });
     Assert.That(response.GetHeader("Set-Cookie"), Is.StringMatching(@"expires=..., \d\d-...-\d\d\d\d \d\d:\d\d:\d\d ..."));
 }