title: Call DELETE method of wcf restful service from client applicaiton
body: <p>Here is how I try to call the DELETE method from my WCF service:</p>
  
  <pre><code>string tmpUrl1 = "http://localhost:1234/MyService.svc/EndPoint/MyMethod";
  WebRequest request1 = WebRequest.Create(tmpUrl1);
  request1.Method = "DELETE";
  byte[] byteArray1 = Encoding.UTF8.GetBytes("{\"idName\":" + newIdName + "}");
  request1.ContentType = "application/json";
  request1.ContentLength = byteArray1.Length;
  Stream dataStream1 = request1.GetRequestStream();
  dataStream1.Write(byteArray1, 0, byteArray1.Length);
  dataStream1.Close();
  WebResponse response1 = request1.GetResponse();
  </code></pre>
  
  <p>But I get error 400.</p>
  
  <p>Here is the method's name in the wcf:</p>
  
  <pre><code>[OperationContract]
      [WebInvoke(
          Method = "DELETE",
          RequestFormat = WebMessageFormat.Json,
          ResponseFormat = WebMessageFormat.Json,
          UriTemplate = "/MyMethod/{deleteRP}/",
          BodyStyle = WebMessageBodyStyle.Bare
                  )]
      MyClass MyMethod(string deleteRP);
  </code></pre>
  
  <p>Where am I making a mistake?</p>