baugarten/node-restful

Patch method support

Satak opened this issue · 5 comments

Satak commented

Does node-restful support 'Patch' REST method?

Sadly, it looks like that's not yet implemented:

var methods = ['get', 'post', 'put', 'delete'], // All HTTP methods, PATCH not currently supported

This is true

But if you only send the property you want to change via put, it only chages it and persist the other ones

Currently PATCH is supported but it's called PUT, PUT should actually override the whole object with the new one that's provided whereas PATCH should only change the field you provide. It looks like @baugarten got these backwards.

If you guys want to try this out I've opened a PR to possibly fix this.
Ref: #152