title: Can someone provide complete working Rest API Sample request to add & delete objects in amazon s3 bucket?
body: <p>I want to delete files and folder from the Amazon s3 bucket. Below is my request, but its not working. </p>
  
  <pre><code>     $.ajax({ 
           type: "POST",
           dataType: "jsonp",
  
           url: "http://s3.amazonaws.com/bucketname/",
            beforeSend: function( xhr ) {
              xhr.setRequestHeader('Action','DELETE');
              xhr.setRequestHeader('AWSAccessKeyId','AWSAccessKeyId');
              xhr.setRequestHeader('signature','signature');
              xhr.overrideMimeType( "application/octet-stream" );
           },
            success: function(data){  alert("IN SUCCESS"); alert(data);  },
            error: function(data) {  alert(data);}
  
       });
  </code></pre>