basil3legs
Programmer
I am using requestWriter to post to a website but as it takes ages for a response to come back, is there any way of sending the data and leaving it at that? I have tried removing the GetResponse parts but that doesn't seem to work. As the code stands (see below) it works fine but is too slow due to a delay at the web server.
Code:
strURL = "[URL unfurl="true"]http://the[/URL] relevent site and page.do"
strPostData = "the POST data"
webRequest = Net.WebRequest.Create(strURL)
webRequest.Method = "POST"
webRequest.ContentType = "application/x-[URL unfurl="true"]www-form-urlencoded"[/URL]
'write the form values into the request message
requestWriter = New IO.StreamWriter(webRequest.GetRequestStream)
requestWriter.Write(strPostData)
requestWriter.Close()
'get the response from the server - which I don't want!
responseReader = New IO.StreamReader(webRequest.GetResponse.GetResponseStream)
Dim responseData As String
Dim strData As String
responseData = responseReader.ReadToEnd
responseReader.Close()
strData = responseData