Is my ajax http-delete request malformed?

I am using a public api for testing that responds to get, post, put, and delete and when attempting to create a http-delete request using jQuery.ajax() my response is undefined. This seems strange as I have successfully received a response using Javascript Fetch to make the request. Is my ajax http-delete request malformed?


  url: "",
  type: "DELETE",
  success: function (response) {
    console.log("Success: " + response);
  error: function (response) {
    console.log("Failure: " + response);


Success: undefined

Things I’ve Tried

  • changing property ‘type’ to ‘method’
  • added a property ‘error’ but the logic goes to success with no response.
  • googling various ajax delete requests and trying those with the API
  • successfully got a response using http-delete request with javascript fetch using the api
  • successfully got a responses on put, post, and get requests using ajax
  • using different browsers (ie. chrome, edge, firefox)


The DELETE endpoint( returns a status code of 204.

This status code indicates the following: 204 No Content(Docs). This means that the action returns no content in response of the DELETE.

This causes the response value to be empty.


The response: