Add a cleaner interface for response headers
— at Version 5
This proposal is to replace HttpResponse._headers
with HttpResponse.headers
as a public interface using a variation of django.utils.datasctructures.CaseInsensitiveMapping
.
It also includes updating tests and documentation to use this, rather than the old dict-like interface, i.e. response.headers['Content-Type'] = 'application/json'
response['Content-Type'] = 'application/json'
.
The dict-like interface won't be deprecated, but will become undocumented, and tests added purely for backwards-compatibility.
Mailing list
PR
Change History
(5)
Owner: |
changed from nobody to Tom Carrick
|
Status: |
new → assigned
|
Needs documentation: |
set
|
Needs tests: |
set
|
Needs documentation: |
unset
|
Needs tests: |
unset
|
Version: |
3.0 → master
|
Triage Stage: |
Unreviewed → Accepted
|
Description: |
modified (diff)
|
I believe this should be accepted