I have really battled this one for about two days now. I am posting some xml to an http server and the following code works great.
The receiving server receives the XML, processes it, then we get an email back regarding the results. The problem is that the receiving server is buffering the response so we don't get a response until the processing is complete. Sometimes this can take up to a minute. So, I tried the following code.
This opens the connection in asynchronous mode and the call to Send() completes immediately. But it appears to abort the process because the receiving server does not get the post. So I did some research and I tried the following.
This works great. resposeReceived evaluates to True but this process takes just as long as the first option we were using. So I start playing with the timeout in the WaitForResponse method and tried the following.
Hmmm.. This was interesting. responseReceived evaluated to False however the 10 second wait was enough to get all of my post out of my client and into the server. The end result was a success.
So, my question is... Is there any method, or property (I've studied and tested most of them with this object) that can allow me to move on once the post is gone ? We don't need to see a result on the server during this process.
Any ideas would be greatly appreciated.
ToddWW
Code:
objHttp.Open("POST","someurl.com",False)
objHttp.Send(xmlData)
Code:
objHttp.Open("POST","someurl.com",True)
objHttp.Send(xmlData)
Code:
objHttp.Open("POST","someurl.com",True)
objHttp.Send(xmlData)
responseReceived = objHttp.WaitForResponse()
Code:
responseReceived = objHttp.WaitForResponse(10)
So, my question is... Is there any method, or property (I've studied and tested most of them with this object) that can allow me to move on once the post is gone ? We don't need to see a result on the server during this process.
Any ideas would be greatly appreciated.
ToddWW