SelectPdf Free Html To Pdf Converter for .NET C# / ASP.NET - Helper Page - View HTTP Headers

This page shows the HTTP Headers sent to it:

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: x-gzip, gzip, deflate
Host: selectpdf.com
If-Modified-Since: Sun, 22 Oct 2017 19:20:26 GMT
User-Agent: CCBot/2.0 (http://commoncrawl.org/faq/)


Sample Code C#



using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SelectPdf.Samples
{
    public partial class view_http_headers : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string headers = string.Empty;
            foreach (string name in Request.Headers)
            {
                string value = Request.Headers[name];
                headers += "<br/>" + name + ": " + value;
            }

            LitHeaders.Text = headers;
        }
    }
}