Back to product page

Posted property


Returns collection of posted variables.

Type

WebHeaders object

Syntax

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

ReadOnly Property Posted As WebHeaders

Remarks

Posted property will return collection of 'fake' WebHeader objects. It is created and should be used when client POSTs data using application/x-urlencoded content type. When doing so, wodWebServer.NET will parse posted data, and provide it as WebHeaders collection. These aren't headers actually - these are variable names and variable values. For example, when client posts data like this:
 
POST /posted.htm HTTP/1.1
Referer: http://localhost/posted.htm
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)
Host: localhost
Content-Length: 79
 
login_username=myname&secretkey=mypass&js_autodetect_results=1&just_logged_in=1
 

then wodWebServer.NET will create collection of 4 WebHeader objects, and provide them through Posted property. These will be
 
User.Request.Posted(0).Name = "login_username"
User.Request.Posted(0).Value = "myname" ...
 

When doing this conversion, wodWebServer.NET will decode urlencoded data so it is readable and can be used directly by your application.

For your reference, this is HTML code snippet that will post data to the server. You can copy/paste it to HTML page and open to see how it look on web page:
<FORM action="posted.htm" method="post">
<INPUT name="login_username">
<INPUT type="password" name="secretkey">
<INPUT type="submit" value="submit">
</FORM>


Platforms

Windows