Versioning: dispatching on custom vendor types on the server side (Ruby)

4 views
Skip to first unread message

Peter Bengtson

unread,
Sep 7, 2012, 3:24:27 AM9/7/12
to rest...@googlegroups.com
To implement API versioning, I need to define custom vendor MIME types for Restfulie. For instance, in RSpec tests,

      get apps_path, {}, {'HTTP_ACCEPT' => "application/vnd.travelocitynordic.cms.v1+json"}

Or ever better

      get apps_path, {}, {'HTTP_ACCEPT' => "application/vnd.travelocitynordic.cms+json; version=1"}

How can I set up the server side to recognise and dispatch on these mime types in Rails controllers, etc?

Thank you.
Reply all
Reply to author
Forward
0 new messages