Backbone.Js Sending data using destroy ()

I have a basic concept of social networks: friend requests.

Each friendโ€™s request can be accepted or rejected, or the action should result in the friendโ€™s request being removed from the collection and deleted from the server.

I can use model.destroy()to query DELETEthe server, and also remove the item from the FriendRequests collection. But I need to send additional data to the server about whether the request was accepted or rejected.?accepted=true|false

How can I send additional data using Destroy()- or am I not mistaken about this?

+5
source share
1 answer

@kinakuta, DELETE. PUT /friend-request/42/accept /friend-request/42/decline. - /PUT, , accepted. " " , , "", . "", "", "" .. , , , /. , .

+2

All Articles