title: how to make a GET httpwebrequest in vb.net
body: <p>i was trying to make a form navigating program and i wanted to know how to make a GET httpwebrequest here is the code i use for a POST httpwebrequest </p>
  
  <pre><code>Dim postData As String = "lsd=AVrFBNXT&amp;display=&amp;enable_profile_selector=&amp;legacy_return=1&amp;next=&amp;profile_selector_ids=&amp;trynum=1&amp;timezone=-120&amp;lgnrnd=163248_FehM&amp;lgnjs=1372203160&amp;email=" &amp; (TextBox1.Text) &amp; "&amp;pass=" &amp; (TextBox2.Text) &amp; "f&amp;default_persistent=1"
  Dim tempcookies As New CookieContainer
  Dim encoding As New UTF8Encoding
  Dim byteData As Byte() = encoding.GetBytes(postData)
  Dim postreq As HttpWebRequest = DirectCast(HttpWebRequest.Create("https://www.facebook.com/login.php"), HttpWebRequest)
  postreq.Method = "POST"
  postreq.KeepAlive = True
  postreq.CookieContainer = tempcookies
  postreq.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729"
  postreq.ContentType = "application/x-www-form-urlencoded"
  postreq.Referer = "https://www.facebook.com/login.php"
  postreq.ContentLength = byteData.Length
  Dim postreqstream As Stream = postreq.GetRequestStream()
  postreqstream.Write(byteData, 0, byteData.Length)
  postreqstream.Close()
  Dim postresponse As HttpWebResponse
  postresponse = DirectCast(postreq.GetResponse, HttpWebResponse)
  tempcookies.Add(postresponse.Cookies)
  logincookie = tempcookies
  Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
  Dim thepage As String = postreqreader.ReadToEnd
  WebBrowser1.DocumentText = thepage
  </code></pre>