Subject: RE: How to use POST method to send http request
Hi Angus,
Here’s how you can do this…
Sub Initialize
Dim s As New NotesSession
Dim doc As NotesDocument
Dim objHttp As Variant
Dim response As String
Dim request As String
Set db = s.CurrentDatabase
Set doc = s.DocumentContext
Dim objXMLHTTP, objXMLDOM, objTitles, objURLs, i
Set objHttp = CreateObject(“Microsoft.XMLHTTP”)
url = |http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb?readviewentries|
req = |<?xml version="1.0" encoding="UTF-8" ?>iiii|
objHttp.open “POST”, url, False, “”, “”
objHttp.setRequestHeader “Content-type”, “application/x-www-form-urlencoded”
objHttp.send(req)
Set xmlDoc = CreateObject(“Msxml2.DOMDocument”)
xmlDoc.loadXML (objHttp.ResponseText)
Set xmlLst = xmlDoc.getElementsByTagName(“viewentry”)
For i = 0 To xmlLst.length - 1
Set newdoc = New notesdocument(db)
newdoc.form=“docfromxml”
Set xmlNode = xmlLst.Item(i)
Set att=xmlnode.childnodes
Forall child In att
Call newdoc.replaceitemvalue(child.nodename,child.text)
End Forall
Call newdoc.save(True,False)
Next
End Sub
For further information, you can use this link…
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/a4800900bb2e919785256e2100501797?OpenDocument
Hope this helps…
Best Regards,
Munish Kaushik