From c165123b985308bface0a1f0e2a78e27c00a55f9 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 29 Mar 2012 13:36:34 -0400 Subject: [PATCH] fix json import --- httpbin/helpers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/httpbin/helpers.py b/httpbin/helpers.py index a8a7304..3527138 100644 --- a/httpbin/helpers.py +++ b/httpbin/helpers.py @@ -96,9 +96,9 @@ def get_dict(*keys, **extras): form = nonflat_dict try: - json = json.loads(request.data) + _json = json.loads(request.data) except ValueError: - json = None + _json = None d = dict( @@ -108,7 +108,8 @@ def get_dict(*keys, **extras): data=data, origin=request.remote_addr, headers=get_headers(), - files=get_files() + files=get_files(), + json=_json ) out_d = dict()