Back to product page

Posted property

Returns collection of posted variables.


  • Basic
The Posted(object) syntax has these parts:
objectAn expression evaluating to an object of type WebRequest


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

then wodWebServer 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 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: <HTML><BODY>
<FORM action=posted.htm method=post>
<INPUT name=login_username><BR>
<INPUT type=password name=secretkey>
<INPUT type=submit value=submit></FORM>