title: WebClient restful Delete
body: <p>I have a simple Restful service being called from a console app so am using <code>WebClient</code>.  I am wondering if this call for Delete is correct.</p>
  <p>The url looks like <code>localhost/RestService1/Person/1</code></p>
  <pre><code>using (var client = new WebClient()) 
  {
      client.UploadString(url, &quot;DELETE&quot;, &quot;&quot;);
  }
  </code></pre>
  <p>I don't like that <code>UploadString</code> does not have an overload without a <code>data</code> parameter.  The passing of an empty parameter is not sitting well with me.  Is there a better method to use for a <code>DELETE</code>?</p>
  <p>I could use <code>WebRequest</code> but I want to just use <code>WebClient</code> to keep it consistent.</p>
  <p>Here is the <code>WebRequest</code> block</p>
  <pre><code>var request = WebRequest.Create(url);
  request.Method = &quot;DELETE&quot;;
  var response = (HttpWebResponse)request.GetResponse();
  </code></pre>
  <p>Both blocks work fine but what is best?  Or is there a better way?</p>