View our GitHub

Please visit sails-docs on GitHub to view documentation on your mobile device.

Edit Page


Sends a virtual DELETE request to a Sails server using


io.socket.delete(url, data, function (data, jwres){
  // ...
Argument Type Details
1 url The destination URL path, e.g. "/checkout".
2 data Optional request data- if provided, will be URL encoded and appended to url (existing query string params in url will be preserved)
3 callback Optional callback- if provided, will be called when the server responds.
Argument Type Details
1 resData Data received in the response from the Sails server (=== jwres.body, equivalent to the HTTP response body.)
2 jwres The JSON WebSocket Response object. Has headers, a body, and a statusCode.


io.socket.delete('/users/9', function (resData) {
  resData; // => {id:9, name: 'Timmy Mendez', occupation: 'psychic'}

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.


We wrote a book!

Get early access to the book
with promotion code: mcneildoc

Get the Book