The line containing "objXmlHttp.send params2Send" (in the 2nd code snipit) should send the post data, right? No POST data is being sent (which is the problem) The test.asp has:
No Form data is returned. I can append parameters to the end of sendStr which will be returned by the QueryString loop.
Can someone explain why this isn't working and how to get it working please?
Thanks.
Code:
Response.write "<h2>QueryString</h2>"
For Each obj In Request.QueryString
Response.write obj & ": " & Request.QueryString(obj) & "<br>"
Next
Response.write "<h2>Form</h2>"
For Each obj In Request.Form
Response.write obj & ": " & Request.Form(obj) & "<br>"
Next
No Form data is returned. I can append parameters to the end of sendStr which will be returned by the QueryString loop.
Can someone explain why this isn't working and how to get it working please?
Thanks.
Code:
Dim objXmlHttp
Dim strHTML
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
params2Send = "param1=" & param1 & "¶m2=" & param2 & "¶m3=" & param3
sendStr = "[URL unfurl="true"]http://myserver.com/test.asp"[/URL]
objXmlHttp.open "POST", sendStr, False
' Send it on it's merry way.
objXmlHttp.send params2Send
'wait for response
Do While objXmlHttp.readyState <> 4
objXmlHttp.waitForResponse(1000)
Loop
' Print out the request status:
Response.Write "Status: " & objXmlHttp.status & " " & objXmlHttp.statusText & "<br />"
responseText = objXmlHttp.responseText