2

I want to get some HTTP source with VB.net. The page is huge though, so it would suit me to pull it in chunks. I'm also already reading about the VB.net background worker.

So far I'm using this code: HTTP GET in VB.NET but my program stalls while it loads the page, for a decent amount of time. The page to get is http://ftp.drupal.org/files/projects/, but don't go there unless you absolutely have to.

Should I stick with the background worker, and/or is there a way to split up the HTTP request?

Community
  • 1
  • 1
emc
  • 507
  • 1
  • 7
  • 25

1 Answers1

3

You have to use WebClient.DownloadStringAsync method to read without blocking the calling thread. (MSDN reference link).

KV Prajapati
  • 93,659
  • 19
  • 148
  • 186