public InMemoryRequest() { Headers = new HttpHeaderDictionary(); Headers.Add("Host", "http://localhost/"); Entity = new HttpEntity(Headers, new MemoryStream()); CodecParameters = new List <string>(); }
public void op_Contains_Token() { var obj = new HttpHeaderDictionary(); Assert.False(obj.Contains("name")); obj.Add(new HttpHeader("name", "value")); Assert.True(obj.Contains("name")); }
void PopulateHeaders(IOwinRequest ctx) { var headerCollection = new HttpHeaderDictionary(); foreach (var header in ctx.Headers) { headerCollection.Add(header.Key, string.Join(",", header.Value)); } Headers = headerCollection; }
public void add_once() { headers.Add("key", "value"); headers.ShouldHaveHeaderValues("key", "value"); }
public void adding_header() { headers.Add("content-length", "42"); headers.ContentLength.ShouldBe(42); }