Versionary v0.1.0 Versionary.Plug.VerifyHeader

Use this plug to verify a version string in the header.

If multiple versions are passed to this plug and at last one matches the version will be considered valid.

Example

plug Versionary.Plug.VerifyHeader, versions: ["application/vnd.app.v1+json"]

By default, this plug will look at the Accept header for the version string to verify against. If you’d like to verify against another header specify the header you’d like to verify against in the header option.

Example

plug Versionary.Plug.VerifyHeader, header: "accept",
                                   versions: ["application/vnd.app.v1+json"]