Class: Stitches::ValidMimeType

Inherits:
AllowlistMiddleware show all
Defined in:
lib/stitches/valid_mime_type.rb

Overview

A middleware that requires all API calls to be for versioned JSON. This means that the Accept header (available to Rack apps as HTTP_ACCEPT) should be like so:

application/json; version=1

This just checks that you’ve specified some numeric version. ApiVersionConstraint should be used to “lock down” the versions you accept.

Defined Under Namespace

Classes: NotAcceptableResponse

Method Summary

Methods inherited from AllowlistMiddleware

#call, #initialize

Constructor Details

This class inherits a constructor from Stitches::AllowlistMiddleware