I think this is a simple question for you, but I don’t understand other cases of webRequests, so I asked here:
How can I make this webRequest asynchronous?
Dim sBuffer As String
Dim oRequest As WebRequest = WebRequest.Create(url)
oRequest.Method = "GET"
Dim oResponse As WebResponse = oRequest.GetResponse()
Dim oStream As New StreamReader(oResponse.GetResponseStream())
sBuffer = oStream.ReadToEnd()
oStream.Close()
oResponse.Close()
Return sBuffer
Thank you for your help!
Regards, Flo
a function with a simple return value cannot be sinmply made asynchronous, you need to find another method of handling the data that comes back. I would suggest using System.Net.WebClient which is a much easier wrapper on what you’ve done above, with this class asynch is really easy.
…
I don’t really speak VB.net but i think thats right from some googling