News for hackers. Stuff that matters.
Re:A bird's eye view on API development by Cakez0r on Tuesday November 17, 2015 @10:27AM (#10581599)
Why is it considered best practice to use the content type header for API versioning? It always seemed like a hack to me. Url versioning makes much more sense if you consider that your API is a resource and the content of your API is a subresource. E.G. GET /v1/post/1/comment/456 would be semantically equivalent to "give me comment with id 456, which belongs to post with id 1, which belongs to api of version 1".
Re:A bird's eye view on API development by subliminalbrad on Tuesday November 17, 2015 @08:10PM (#10585248)
The URL is meant to represent a specific resource. You're requesting a comment resource, not a version of a comment resource. It's semantically inappropriate and may lead to unnecessary complexity.

There is an HTTP concept created specifically for this idea. Why not use it?