Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(300)

Issue 17890043: Improve json_response to allow adjusting the HTTP code. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by iannucci
Modified:
11 years, 10 months ago
Reviewers:
vadimsh, M-A
CC:
codereview-list_googlegroups.com
Base URL:
hg::https://iannucci%40chromium.org@code.google.com/p/rietveld/@refactor_decorator
Visibility:
Public.

Description

Improve json_response to allow adjusting the HTTP code. Conservatively utilizes the new json_response behavior. For apis which claim to respond with JSON, we should always respond with JSON. However, I know that some of the non-JSON responses may be expected by clients, so I don't correct everything that I could correct. R=maruel@chromium.org BUG=

Patch Set 1 #

Patch Set 2 : Use STATUS_CODE instead of special string #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -4 lines) Patch
M codereview/views.py View 1 5 chunks +19 lines, -4 lines 1 comment Download

Messages

Total messages: 11
iannucci
PTAL
11 years, 10 months ago (2013-10-27 11:46:48 UTC) #1
M-A
Vadim, what do you think?
11 years, 10 months ago (2013-10-28 15:37:23 UTC) #2
vadimsh
On 2013/10/28 15:37:23, M-A wrote: > Vadim, what do you think? I think it looks ...
11 years, 10 months ago (2013-10-28 17:56:35 UTC) #3
M-A
On 2013/10/28 17:56:35, vadimsh wrote: > On 2013/10/28 15:37:23, M-A wrote: > > Vadim, what ...
11 years, 10 months ago (2013-10-29 01:28:14 UTC) #4
iannucci
On 2013/10/29 01:28:14, M-A wrote: > On 2013/10/28 17:56:35, vadimsh wrote: > > On 2013/10/28 ...
11 years, 10 months ago (2013-10-29 03:50:37 UTC) #5
iannucci
ping :) WDYT about the following idea: StatusCode = object() ... return {StatusCode: 204, ...} ...
11 years, 10 months ago (2013-10-29 17:26:13 UTC) #6
M-A
On 2013/10/29 17:26:13, iannucci wrote: > ping :) > > WDYT about the following idea: ...
11 years, 10 months ago (2013-10-29 18:06:53 UTC) #7
iannucci
PTAL; Now with STATUS_CODE.
11 years, 10 months ago (2013-10-29 18:41:36 UTC) #8
M-A
lgtm with optional nit. https://codereview.appspot.com/17890043/diff/20001/codereview/views.py File codereview/views.py (right): https://codereview.appspot.com/17890043/diff/20001/codereview/views.py#newcode108 codereview/views.py:108: STATUS_CODE = object() Thinking about ...
11 years, 10 months ago (2013-10-29 18:48:43 UTC) #9
iannucci
On 2013/10/29 18:48:43, M-A wrote: > lgtm with optional nit. > > https://codereview.appspot.com/17890043/diff/20001/codereview/views.py > File ...
11 years, 10 months ago (2013-10-29 18:50:27 UTC) #10
iannucci
11 years, 10 months ago (2013-10-30 03:14:40 UTC) #11
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b