mitsuhiko/flask — Issue #422: Allow specifying request_class on a per-blueprint basis
Author: jfinkels
Created: 2012-03-08 21:40:39+00:00
State: open

Suppose we have a situation in which a user creates a blueprint for a ReSTful JSON API and another blueprint for something else. On a badly formatted request, the URLs in the API blueprint will be parsing JSON (using `Request.json`) and should return JSON responses (possibly using `Request.on_json_loading_failed`), but bad requests to URLs in the other blueprint should respond with regular old HTML responses.

In this case the user should be able to set a custom `Flask.request_class` *for the API blueprint only* which overrides the `on_json_loading_failed` method.