SelectPdf for .NET - Helper Page - View HTTP Headers - C# / ASP.NET MVC Sample

This page shows the HTTP Headers sent to it:

Connection: close
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: zstd, br, gzip
Accept-Language: en-US,en;q=0.5
Host: selectpdf.com
User-Agent: CCBot/2.0 (https://commoncrawl.org/faq/)

Sample code · C#
using System.Web.Mvc;
using System.Configuration;
namespace SelectPdf.Samples.Controllers
{
    public class ViewHttpHeadersController : Controller
    {
        // GET: ViewHttpHeaders
        public ActionResult Index()
        {
            string headers = string.Empty;
            foreach (string name in Request.Headers)
            {
                string value = Request.Headers[name];
                headers += "<br/>" + name + ": " + value;
            }

            ViewData.Add("HeadersValue", headers);
            
            return View();
        }
    }
}