From 23de58682c730a67820e77605386a16303d57447 Mon Sep 17 00:00:00 2001 From: Adam Byrtek Date: Thu, 2 Apr 2015 01:13:48 +0100 Subject: [PATCH] Remove redundant `cache` flag --- docs/testing.rst | 8 ++++++++ flask/wrappers.py | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/testing.rst b/docs/testing.rst index fdf57937..90544f7d 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -353,3 +353,11 @@ independently of the session backend used:: Note that in this case you have to use the ``sess`` object instead of the :data:`flask.session` proxy. The object however itself will provide the same interface. + + +Testing JSON APIs +----------------- + +.. versionadded:: 1.0 + +Flask has comprehensive diff --git a/flask/wrappers.py b/flask/wrappers.py index bd6aa0f3..904d50fd 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -18,10 +18,10 @@ from .globals import _request_ctx_stack _missing = object() -def _get_data(req, cache): +def _get_data(req): getter = getattr(req, 'get_data', None) if getter is not None: - return getter(cache=cache) + return getter() return req.data @@ -84,7 +84,7 @@ class JSONMixin(object): # been encoded correctly as well. charset = self.mimetype_params.get('charset') try: - data = _get_data(self, cache) + data = _get_data(self) if charset is not None: rv = json.loads(data, encoding=charset) else: