5 ms·
Yes, it would be horrible if you instead had to do: POST /user/123/follow
by fleitz 13y ago
Yes, it would be horrible if you instead had to do:
POST /user/123/follow
- jasonkostempski 13y agoPUT /myuser/following/theiruser
- deleted 13y ago[deleted]
- manarth 13y agoPUT /user/123 { id: 123, following: { foo, bar, baz } }
- icebraining 13y agoPUT /user/123/following /user/foo /user/bar http://www.other-site-using-standard-formats.com/user/baz Sigh, if only.
- seliopou 13y agoYeah, if that's where your URL ended. But what if your URLs kept going? Say you had /user/123/followers or /user/123/followers/followers or /user/123/followers/followers/following ? When your URLs have a non-obvious terminus (as is typical of proper REST APIs) it becomes clear that the verb does not belong in the URL path.