title: .NET 2.0 Rest Client
body: <p>I am having trouble finding out if you can build a .Net 2.0 REST client. I have searched high and low but only come across results that mention using 3.5 and WCF. I would like to be able to build a .Net REST client using 2.0 if at all possible. I have a general idea of what I want to accomplish and I am running into issues passing parameters against an authenticated REST web service. I am looking for examples that are .Net 2.0 vb or c#. </p>
  
  <p>I am currently trying to use HttpWebRequest but running into issues:</p>
  
  <pre><code>        Dim ord As order
          Dim url As String = String.Format("https://login.someurl.com/rest/order/{0}", Web.HttpUtility.UrlEncode(id))
          Dim request As HttpWebRequest = WebRequest.Create(New Uri(url))
          request.Method = "GET"
          request.ContentType = "application/json"
          request.Credentials = New NetworkCredential(UserName, Password)
          Dim resp As HttpWebResponse = Nothing
  
          resp = request.GetResponse()
          Dim reader As StreamReader = New StreamReader(resp.GetResponseStream)
          Dim response As String = reader.ReadToEnd
  
          ord = JsonConvert.DeserializeObject(response)
  </code></pre>
  
  <p>Error Message I am receiving on the GetResponse() line is: "The remote server returned an error: (412) Parameter Error."</p>