title: Post request with System.Net.WebClient
body: <p>I believe the answer is simple but none of the code samples I've found worked...
  Basically I'm trying to send a post request using System.Net.WebClient, with a string parameter; But the server gets the parameter as null.
  It has to be written in dotnet 2, so I can't use HttpClient (which worked by the way).</p>
  
  <p>client:</p>
  
  <pre><code>        using(var client = new WebClient())
          {
              try
              {
                  var res = client.UploadString(_uri, "POST", "test");
                  if (res != "test")
                      return false;
              }
  
              catch (Exception exception)
              {
                    Console.WriteLine(exception.Message);
                    return false;
              }
  </code></pre>
  
  <p>service:</p>
  
  <pre><code>            public string Post([FromBody]string value)
              {
                  return value;
              }
  </code></pre>