title: cURL post to HTTPCLient C#
body: <p>I'm trying to post a file to PushBullet API service.</p>
  
  <p>The info site of the API shows an example:</p>
  
  <pre><code>curl -i https://api.pushbullet.com/api/pushes \
  -u API_KEY:
  -F device_iden=u1qSJddxeKwOGuGW
  -F type=file
  -F file=@test.txt
  </code></pre>
  
  <p>And I'm trying to do it with <code>HttpClient</code> from C#</p>
  
  <p>I know how to post a file using <code>Httpclient</code>, using <code>MultipartFormDataContent</code>, but how can I add the device_iden and type info to the client? </p>
  
  <p>I'm using this</p>
  
  <pre><code>using (var content = new MultipartFormDataContent())
              {
                  try
                  {
                      content.Add(new StreamContent(new FileStream(pathFile, FileMode.Open, FileAccess.Read)));
                      var resp = wc.PostAsync(new Uri(baseUri, "api/pushes"), content);
  
                  }
                  catch (Exception)
                  {
  
                      throw;
                  }
              }
  </code></pre>
  
  <p>[[New Added]]</p>
  
  <p>Using cURL and fiddler this would be the POST</p>
  
  <pre><code>POST http://\/ HTTP/1.1
  Authorization: Basic d45YQkxueWswSmxQRTYFjc1deUzNo8UtueVZpaktIZm34anVqdU9NZerWYmFlOp==
  User-Agent: curl/7.33.0
  Host: \
  Accept: */*
  Proxy-Connection: Keep-Alive
  Content-Length: 787
  Expect: 100-continue
  Content-Type: multipart/form-data; boundary=------------------------886f3981539a91b3
  
  --------------------------886f3981539a91b3
  Content-Disposition: form-data; name="device_iden"
  
  ujuOMfjVbaedjz7O3P0Jl6
  --------------------------886f3981539a91b3
  Content-Disposition: form-data; name="type"
  
  file
  --------------------------886f3981539a91b3
  Content-Disposition: form-data; name="file"; filename="img.gif"
  Content-Type: application/octet-stream
  GIF89a������@�;A�;A�;A�;B�&lt;B�&lt;������!�Created with GIMP�!�
  ��,����������x�����I��8KȻ�`(�$��h��l{�p�tm߮��x����P,���҃l:q���I���؅u�Mf����
  ��d�y}LG��{���J�&gt;���W};������^�1�����������
  
  --------------------------886f3981539a91b3--
  </code></pre>