rest function, implement put and delete

- [ ]add PUT
- [ ]add DELETE