title: Trying to Post a Slack Message through NameValueCollection using HttpClient.PostAsync instead of WebClient
body: <p>I am trying to use HttpClient to post a NameValueCollection to a specific Url.  I have the code working using WebClient, but I'm trying to figure out if it is possible to do using HttpClient.</p>
  
  <p>Below, you will find my working code that uses WebClient: </p>
  
  <pre><code>var payloadJson = JsonConvert.SerializeObject(new { channel, username, text });
  
  using (var client = new WebClient())
  {
      var data = new NameValueCollection();
      data["payload"] = payloadJson;
  
      var response = client.UploadValues(_uri, "POST", data);
  
      var responseText = _encoding.GetString(response);
  }
  </code></pre>
  
  <p>I'm using this code to try to post a message to a Slack Channel using a web integration.  Is there a way to implement this same functionality while using HttpClient? </p>
  
  <p>The Slack error that I receive when I try to use HttpClient is "missing_text_or_fallback_or_attachment".</p>
  
  <p>Thanks in advance for any help! </p>