HTTP Headers

This is a quick and a small post on reading the HTTP headers in ASP.NET. Code gets the HTTP header key – value pairs and write it to a text file. 1: protected void Page_Load(object sender, EventArgs e) 2: { 3: var headers = Request.Headers; 4: StreamWriter writer = new StreamWriter(Server.MapPath("~/data.txt")); 5:  6: foreach (var … Continue reading HTTP Headers

Advertisements