This object is used to change Body contents of current
request, so that it adds your variables to post to the
server. Typically, this will be used to duplicate
browser's behavior to fill-up some forms, login to the
server using webforms, entering search queries etc. To see
this in live demo, please open http://www.weonlydo.com/HttpDLX/Demo/TestFormPost.htm.
Then, look at the below code - we will just do the same
thing with wodHttpDLX. Please note that wodHttpDLX will
also add necessary 'Content-type' header
automatically.
wodHttp1.Request.FormPost.Add "Username", "joe"
wodHttp1.Request.FormPost.Add "Password", "joe"
wodHttp1.Post "http://www.weonlydo.com/HttpDLX/Demo/TestFormPost.asp"
which will produce request body like this to be
sent:
POST /HttpDLX/Demo/TestFormPost.asp
HTTP/1.0
Host: www.weonlydo.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 25
Username=joe&Password=joe