added delete function with headers

this also includes the additions made by mcottingham : Added headers to http.js plugin #368