RailsCasts Pro episodes are now free!

Learn more or hide this

Geoff Baskwill's Profile

GitHub User: glb

Comments by Geoff Baskwill


Thanks Ryan for the examples. Some clients will use multiple Accept header values when they expect to live in mixed environments, so it would be good to put the default version higher in the routes (in the version I read just now, it looks like a client sending v1 and v2 in the Accept header will get v1).

Not sure how you would efficiently use the q parameter (i.e. Accept: application/vnd.myapp+json;v=2;q=1.0,application/vnd.myapp+json;v=1;q=0.9), as ideally the server would select the most-preferred client version that it also supports, but that seems like a lot of overhead just to get strict correctness.