Opened 10 years ago

Closed 9 years ago

#3362 closed (wontfix)

Add HttpResponseNoContent response type

Reported by: afternoon@… Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: http status response
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

Description

Add a django.http.HttpResponseNoContent class which encapsulates the 204 response from the HTTP spec.

This should be used when input is sent to the server, but no response is received. An Ajax callback is a good example of where this is relevant.

Attachments (3)

httpresponsenocontent.patch (621 bytes) - added by afternoon@… 10 years ago.
Add django.http.HttpResponseNoContent (status 204 response class)
httpresponsenocontent.2.patch (621 bytes) - added by afternoon@… 10 years ago.
Add django.http.HttpResponseNoContent? (status 204 response class)
httpresponsenocontent.3.patch (1.2 KB) - added by afternoon@… 10 years ago.
Add django.http.HttpResponseNoContent (status 204 response class) and documentation

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by afternoon@…

Attachment: httpresponsenocontent.patch added

Add django.http.HttpResponseNoContent (status 204 response class)

Changed 10 years ago by afternoon@…

Add django.http.HttpResponseNoContent? (status 204 response class)

comment:1 Changed 10 years ago by afternoon@…

Doh. Fixed the typo this time.

Changed 10 years ago by afternoon@…

Add django.http.HttpResponseNoContent (status 204 response class) and documentation

comment:2 Changed 10 years ago by anonymous

Added documentation.

comment:3 Changed 10 years ago by mir@…

Needs tests: set
Triage Stage: UnreviewedDesign decision needed

comment:4 Changed 9 years ago by James Bennett

#3208 was a duplicate.

comment:5 Changed 9 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

We've decided in the past not to add a new class for every single response code. You can already pass the status code in when creating the HttpResponse class, so that can be used in this case.

Note: See TracTickets for help on using tickets.
Back to Top