Back to product page

Headers property


Returns reference to response headers.

Type

WebHeaders object

Syntax

  • C#
  • VB.NET
WebHeaders Headers {get; };

ReadOnly Property Headers As WebHeaders

Remarks

This property returns reference to collection of all headers that will be sent to the client in the response. wodWebServer.NET will add few headers by itself (such as "Server", "Date", session "Set-Cookie" etc..) but you are free to add any other header you think may be needed.

If you're creating response by yourself, you should specify Content-Type header to describe type of information you're sending to the client.

wodWebServer.NET will automatically add Content-Length header if you specified Body or Stream properties!

To access specific header from the collection, you can use code like this:
 
Debug.Print(User.Response.Headers("Date").Value)
 

or, for example
 
Dim h As WeOnlyDo.Server.WebHeader
   For each h in User.Response.Headers
       Debug.Print(h.Name + " " + h.Value)
   Next
 


Platforms

Windows