wodHttpDLX ActiveX Control - HttpRequestFormUpload Object
    
 
Description

HttpRequestFormUpload Class


Remarks

This object is used to change Body contents of current request, so that it adds your variables and files which should be uploaded to the server. For example, you can upload file and set uploader name using VB code like this:

(feel free to go to http://www.weonlydo.com/HttpDLX/Demo/TestFormUpload.htm to see what kind of behavior we are trying to duplicate with below code)

wodHttp1.Request.FormUpload.AddFile "TheFile", "c:\log.txt" 'put real file instead of this one
wodHttp1.Request.FormUpload.Add "Name", "WeOnlyDo! test application"
wodHttp1.Blocking = True
wodHttp1.Post "http://www.weonlydo.com/HttpDLX/Demo/TestFormUpload.asp"

which will produce request body like this to be sent:

POST /HttpDLX/Demo/TestFormUpload.asp HTTP/1.0
Host:
www.weonlydo.com
Content-Type: multipart/form-data; boundary=---------------------------6e372e8e22c8
Content-Length: 339

-----------------------------6e372e8e22c8
Content-Disposition: form-data; name="TheFile"; filename="log.txt"
Content-Type: application/octet-stream

DHCP Server Started

-----------------------------6e372e8e22c8
Content-Disposition: form-data; name="Name"

WeOnlyDo! test application
-----------------------------6e372e8e22c8--

 




Members
Methods
Add Adds new variable item to the collection.
AddFile Adds new file item to the collection.