title: Curl request written in C# doesn't work
body: <p>I'm trying to write a specific curl request in C#, and I keep getting a 500 server error response from the server. This curl request essentially makes a post request to an API by the company Highwinds. This request sends json data, and sets the Auth Bearer token header. </p>
  
  <p>This is the curl request that works fine (note that I've replaced my actual bearer token with {token} and my actual account id with {accountId} to obfuscate that info):</p>
  
  <pre><code>curl -H "Authorization: Bearer {token}" -H "Content-Type: application/json" -d "@data.json" "https://striketracker.highwinds.com/api/accounts/{accountId}/purge"
  </code></pre>
  
  <p>Here's the C# code that gives me a generic 500 server error from the Highwinds API (note that I've replaced my actual bearer token with {token}, my actual account id with {accountId}, and the url in the json string with {url}, in order to obfuscate that personal info):</p>
  
  <pre><code>var accountId = "{accountId}";
  var purgeURI =  string.Format("https://striketracker.highwinds.com/api/accounts/{0}/purge", {accountId});
  var query =
  @"{""list"": [{""url"": ""{url}"",""recursive"": true}]}";
  var token = {token};
  
  
  using (var httpClient = new HttpClient())
  {
  
  var url = new Uri(purgeURI);
  using (var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, url))
  {
      httpRequestMessage.Headers.Add(System.Net.HttpRequestHeader.Authorization.ToString(),
        string.Format("Bearer {0}", token));
  
      httpRequestMessage.Content = new StringContent(query,
                  Encoding.UTF8,
                  "application/json");
  
      await httpClient.SendAsync(httpRequestMessage).ContinueWith(task =&gt;
      {
  
          var response = task.Result;
          var blah = response.Content.ReadAsStringAsync().Result;
  
          Console.WriteLine(response.Content.ReadAsStringAsync().Result);
      });
  }
  }
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>*Update: The following line of code was added to remove the Expect header that HttpRequest adds to a request by default. After removing this header I was able to get Highwinds API to accept the request without bombing.</p>
  
  <p>"request.ServicePoint.Expect100Continue = false;"</p>