title: WebClient on WP7 - Throw "A request with this method cannot have a request body"
body: <p>If I execute this code in a Consoleapp it works fine:</p>
  
  <pre><code>        string uriString = "http://url.com/api/v1.0/d/" + Username + "/some?amount=3&amp;offset=0";
  
          WebClient wc = new WebClient();
  
          wc.Headers["Content-Type"] = "application/json";
          wc.Headers["Authorization"] = AuthString.Replace("\\", "");
  
          string responseArrayKvitteringer = wc.DownloadString(uriString);
          Console.WriteLine(responseArrayKvitteringer);
  </code></pre>
  
  <p>But if I move the code to my WP7 project like this:</p>
  
  <pre><code>        string uriString = "http://url.com/api/v1.0/d/" + Username + "/some?amount=3&amp;offset=0";
  
              WebClient wc = new WebClient();
  
              wc.Headers["Content-Type"] = "application/json";
              wc.Headers["Authorization"] = AuthString.Replace("\\", "");
  
              wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
              wc.DownloadStringAsync(new Uri(uriString));
  
      void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
      {
          MessageBox.Show(e.Result);
      }
  </code></pre>
  
  <p>I got the exception: A request with this method cannot have a request body.</p>
  
  <p>Why?</p>
  
  <p>The solution is to remove the Content-type:</p>
  
  <pre><code>   string uriString = "http://url.com/api/v1.0/d/" + Username + "/some?amount=3&amp;offset=0";
  
              WebClient wc = new WebClient();
  
              //wc.Headers["Content-Type"] = "application/json";
              wc.Headers["Authorization"] = AuthString.Replace("\\", "");
  
              wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
              wc.DownloadStringAsync(new Uri(uriString));
  
      void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
      {
          MessageBox.Show(e.Result);
      }
  </code></pre>