title: Trying to send CURL Command using VB.Net and HttpWebRequest - Error 403 Forbidden
body: <p>I have been trying to send this CURL Command below, and tried a few examples out there but none of them work, as I need to send the username:password and not sure if this is a HEADER and also how to send the BODY of the GET Request. Just looking for a bit of an example which sends user:password as can't find one anywhere?</p>
  
  <p>curl --data {"version":"1.1","method":"room_verify","params":{"account":{"type":"room","value":"0"}}} --user test:test <a href="http://ressrv.worldweb.com:8001/json_pos_generic/22" rel="nofollow noreferrer">http://ressrv.worldweb.com:8001/json_pos_generic/22</a></p>
  
  <p>Here is my Code for this:</p>
  
  <pre><code>        Dim url As String = "http://ressrv.worldweb.com:8001/json_pos_generic/22"
      Dim wrq = CType(Net.WebRequest.Create(url), HttpWebRequest)
          Dim postString As String = "{""version"":""1.1"",""method"":""room_verify"",""params"":{""account"":{""type"":""room"",""value"":""0""}}}"
  
          wrq.Method = "POST"
          wrq.ContentType = "application/json"
          wrq.ContentLength = postString.Length
          wrq.Credentials = New NetworkCredential("test", "test")
  
  
      Dim wrqWriter As New StreamWriter(wrq.GetRequestStream())
      wrqWriter.Write(postString)
      wrqWriter.Close()
  
      Dim responseReader As New StreamReader(wrq.GetResponse().GetResponseStream())
          Dim responseData As String = responseReader.ReadToEnd()
  </code></pre>
  
  <p>Any Help or Guidance would be much appreciated ...</p>