
September 6th, 2006, 07:20 PM
|
|
Contributing User
|
|
Join Date: Apr 2005
Posts: 116
Time spent in forums: 9 h 27 m 8 sec
Reputation Power: 4
|
|
|
XML Post not working
I am using the following code:
I create the xml and then call the xmlpost function.
I am getting an error on the .send “The download of the specified resource has failed”
Code:
Private Function xmlPost(ByVal sURL As String, ByVal sRequest As String, ByVal iTimeOut As Integer, ByRef sResponse As String) As Boolean
Dim sSource As String
Dim iCount As Integer
Dim objXMLPost As MSXML2.XMLHTTP40
Dim iLTimeOut As Long
xmlPost = False
Set objXMLPost = New MSXML2.XMLHTTP40
iLTimeOut = iTimeOut
iLTimeOut = 1000 * iLTimeOut
objXMLPost.Open "POST", sURL, False
objXMLPost.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXMLPost.send sRequest
sResponse = objXMLPost.responseText
xmlPost = True
Set objXMLPost = Nothing
Exit Function
End Function
Does anyone have any idea?
Thanks,
Ninel
|