Browse Source

Deprecate request.json property

pull/1206/head
INADA Naoki 10 years ago
parent
commit
61097c47a3
  1. 4
      flask/wrappers.py

4
flask/wrappers.py

@ -103,7 +103,9 @@ class Request(RequestBase):
The :meth:`get_json` method should be used instead.
"""
# XXX: deprecate property
from warnings import warn
warn(DeprecationWarning('json is deprecated. '
'Use get_json() instead.'), stacklevel=2)
return self.get_json()
@property

Loading…
Cancel
Save