title: HttpWebRequest with Windows 8 Phone App
body: <p>When i try to make <code>HttpWebRequest</code> it is returning <code>System.Net.ProtocolViolationException</code> error.</p>
  
  <pre><code>private void txtGo_Click(object sender, RoutedEventArgs e)
      {
          WebRequest client =
              WebRequest.Create("http://api.worldweatheronline.com/free/v1/weather.ashx?q=London&amp;format=json&amp;num_of_days=5&amp;key=jdbcn8yuwebwybxjpqzzxyhy");
          client.ContentType = "application/json";
          client.BeginGetResponse(ReadWebRequestCallBack, client);
      }
  
      private void ReadWebRequestCallBack(IAsyncResult callBackResult)
      {
          var myRequest = (HttpWebRequest) callBackResult.AsyncState;
          if(myRequest != null)
          {
              try
              {
                  var response = (HttpWebResponse)myRequest.EndGetResponse(callBackResult);
                  txtContent.Text = response.StatusCode.ToString();
              }
              catch(WebException ex)
              {
                  txtContent.Text = ex.Message;
              }
          }
      }
  </code></pre>
  
  <p>When i remove this line <code>client.ContentType = "application/json";</code> there is a different error which is below</p>
  
  <pre><code> {System.Net.WebException: The remote server returned an error: NotFound. ---&gt; System.Net.WebException: The remote server returned an error: NotFound.
     at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult  asyncResult)
    at System.Net.Browser.ClientHttpWebRequest.&lt;&gt;c__DisplayClasse.&lt;EndGetResponse&gt;b__d(Object sendState)
    at System.Net.Browser.AsyncHelper.&lt;&gt;c__DisplayClass1.&lt;BeginOnUI&gt;b__0(Object sendState)
     --- End of inner exception stack trace ---
     at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
     at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
     at MyClimate.MainPage.ReadWebRequestCallBack(IAsyncResult callBackResult)}
  base: {System.Net.WebException: The remote server returned an error: NotFound. ---&gt; System.Net.WebException: The remote server returned an error: NotFound.
     at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult as yncResult)
     at System.Net.Browser.ClientHttpWebRequest.&lt;&gt;c__DisplayClasse.   &lt;EndGetResponse&gt;b__d(Object sendState)
     at System.Net.Browser.AsyncHelper.&lt;&gt;c__DisplayClass1.&lt;BeginOnUI&gt;b__0(Object sendState)
     --- End of inner exception stack trace ---
     at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
     at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
     at MyClimate.MainPage.ReadWebRequestCallBack(IAsyncResult callBackResult)}
     Response: {System.Net.Browser.ClientHttpWebResponse}
     Status: UnknownError
  </code></pre>