diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-09-13 19:24:48 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-09-13 19:24:48 +0200 |
| commit | 8528526f0b6dc8828247ef03f11e4894580f8dd5 (patch) | |
| tree | f81dd07811a300274fed9098594d074291c069ec /budget/rest.py | |
| parent | e13ceaf351d4b54dd2bc651d9f4385a8188b7418 (diff) | |
| download | ihatemoney-mirror-8528526f0b6dc8828247ef03f11e4894580f8dd5.zip ihatemoney-mirror-8528526f0b6dc8828247ef03f11e4894580f8dd5.tar.gz ihatemoney-mirror-8528526f0b6dc8828247ef03f11e4894580f8dd5.tar.bz2 | |
API: set the mimetype on the response
Diffstat (limited to 'budget/rest.py')
| -rw-r--r-- | budget/rest.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/budget/rest.py b/budget/rest.py index e698e21..8ade14b 100644 --- a/budget/rest.py +++ b/budget/rest.py @@ -133,7 +133,8 @@ def serialize(func): return data else: # serialize it - return SERIALIZERS.get(mime, "text/json").encode(data) + return werkzeug.Response(SERIALIZERS[mime].encode(data), + status=200, mimetype=mime) return wrapped |
