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

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 VB.NET



Namespace Controllers
    Public Class ViewHttpHeadersController
        Inherits Controller

        ' GET: ViewHttpHeaders
        Public Function Index() As ActionResult
            Dim headers As String = String.Empty
            For Each name As String In Request.Headers
                Dim value As String = Request.Headers(name)
                headers += "<br/>" & name & ": " & value
            Next

            ViewData.Add("HeadersValue", headers)

            Return View()
        End Function
    End Class
End Namespace