bploetz / versionist

A plugin for versioning Rails based RESTful APIs.
MIT License
971 stars 51 forks source link

Use semantically correct HTTP headers in examples #93

Closed alexmreis closed 3 years ago

alexmreis commented 3 years ago

The examples currently use API-HEADER as the header, which deviates from the way headers are defined in camelcase in the HTTP 1/.1 protocol definition - RFC 2616.

bploetz commented 3 years ago

@alexmreis the X- prefix is at a minimum controversial, and to some considered deprecated altogether. (see RFC 6648). I don't think it's appropriate for this library to take a stand on this (ultimately it's up to you as an API designer to pick what's right for your situation), but I'll accept the PR if you drop the X- prefixes and just change the examples to use camel case.

alexmreis commented 3 years ago

@bploetz updated the PR to drop the X- from the updated examples. Thanks for considering the PR 🙌🏻

bploetz commented 3 years ago

@alexmreis thanks for the contribution