TorrServer
TorrServer copied to clipboard
[Feature] RESTful API
Make all APIs RESTful/CRUD
Example:
Instead of POST /torrents
{
"action": "add|get|set|rem|list|drop",
"hash": "<hash>"
}
Make it:
- INDEX
/torrents - POST
/torrents:{ hash: "<hash>", ... } - PUT|PATCH
/torrents/<hash> - DELETE
/torrents/<hash>
I know, tht it will be breaking change, but at least it'l make API more user-friendly and easy-to-integrate, so it can be added alongside with current API, with following routes: /api/v2/torrents, etc...
Also it'll help making proper API documentation (#49)
INDEX is not standard HTTP verb, avoid it please.