title: CURL post request to C# post request
body: <p>Could you please help me to make a post request in c#. Here is curl:</p>
  
  <pre><code>curl -X POST https://api.test.com/call \
    -H "Content-Type: application/json" \
    -H "Authorization: Token token=YOUR_TOKEN" \
    -d '{"amount":10.00, "id":"123", "customer":{"external_id":"100"}, "receiver":{"external_id":"200"}}'
  </code></pre>
  
  <p>I tried doing this: </p>
  
  <pre><code>string myJson = "{"amount":10.00, "id":"123", "customer":{"external_id":"100"}, "receiver":{"external_id":"200"}}";
      using (var client = new HttpClient())
                  {
                      client.BaseAddress = new Uri("https://api.test.com");                    
                      client.DefaultRequestHeaders.Add("APIAccessToken", "myToken");               
                      var content = new StringContent(myJson, Encoding.UTF8, "application/json");
                      var response = await client.PostAsync("https://api.test.com/call/", content);
                      resultContent = await response.Content.ReadAsStringAsync();
                  }
  </code></pre>
  
  <p>But getting bad request response 400 Error. I am new to this, will appreciate your help. </p>