How can I do it? The syntax is from a vendor who developed the web app in java.
This piece of code is in vb6 works, how to convert to vb.net
'Create an instance of the WinHttpRequest object
Set WinHttpReq = New WinHttpRequest
'Hard coded URL that HTTP Request will be performed
'strURL = "http://localhost/retail/eod.do?action=submit"
'Set the zip file's path name
StrFileName = App.Path & "\ddmmmyyy.zip"
'Grap the file
nFile = FreeFile
Open StrFileName For Binary As #nFile
strFile = String(LOF(nFile), " ")
Get #nFile, , strFile
Close #nFile
'Assemble an HTTP request.
WinHttpReq.Open "POST", strURL, False
'Set the header
WinHttpReq.setRequestHeader "Content-Type", "multipart/form-data; boundary=Xu02=$"
'Assemble the body
strBody = "--Xu02=$" & vbCrLf & _
"Content-Disposition: form-data; name=""file""; filename=""" & StrFileName & """" & vbCrLf & _
"Content-type: file" & vbCrLf & vbCrLf & _
strFile & vbCrLf & _
"--Xu02=$--"
'Because of binary zeros, post body has to convert to byte array
aPostBody = StrConv(strBody, vbFromUnicode)
'Send the HTTP Request.
WinHttpReq.send aPostBody