Opened 9 years ago

Closed 8 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@… 9 years ago.
Add django.http.HttpResponseNoContent (status 204 response class)
httpresponsenocontent.2.patch (621 bytes) - added by afternoon@… 9 years ago.
Add django.http.HttpResponseNoContent? (status 204 response class)
httpresponsenocontent.3.patch (1.2 KB) - added by afternoon@… 9 years ago.
Add django.http.HttpResponseNoContent (status 204 response class) and documentation

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by afternoon@…

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

Changed 9 years ago by afternoon@…

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

comment:1 Changed 9 years ago by afternoon@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Doh. Fixed the typo this time.

Changed 9 years ago by afternoon@…

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

comment:2 Changed 9 years ago by anonymous

Added documentation.

comment:3 Changed 9 years ago by mir@…

  • Needs tests set
  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 8 years ago by ubernostrum

#3208 was a duplicate.

comment:5 Changed 8 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to closed

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