mirror of https://github.com/pallets/flask.git
Deprecate request.json property
This commit is contained in:
parent
7169f44d88
commit
61097c47a3
|
|
@ -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…
Reference in New Issue