Skip to content
Myr

Remove redundant `cache` flag

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Adam Byrtek · committed by Markus Unterwaditzer · parent c9ef500 · Browse files · 2 files+11 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+11 added−3 removed

  • other:+11 added−3 removed

2 files+11 added−3 removed

modified:docs/testing.rst+8 added
351 unmodified lines
352353Note that in this case you have to use the ``sess`` object instead of the354:data:`flask.session` proxy. The object however itself will provide the355same interface.356357358Testing JSON APIs359-----------------360361.. versionadded:: 1.0362363Flask has comprehensive
modified:flask/wrappers.py+3 added-3 removed
16 unmodified lines
1718_missing = object()192021def _get_data(req, cache):21def _get_data(req):22 getter = getattr(req, 'get_data', None)23 if getter is not None:24 return getter(cache=cache)24 return getter()25 return req.data262728class JSONMixin(object):
54 unmodified lines
83 # that if the response charset was set explicitly then the data had84 # been encoded correctly as well.85 charset = self.mimetype_params.get('charset')86 try:87 data = _get_data(self, cache)87 data = _get_data(self)88 if charset is not None:89 rv = json.loads(data, encoding=charset)90 else:91 rv = json.loads(data)
126 unmodified lines