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:

Connection: close
Accept: */*
Accept-Encoding: gzip, br, zstd, deflate
Host: selectpdf.com
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)


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;
        }
    }
}