Adding headers to GenericAPIView responses #8079
Unanswered
jcassee
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm looking for a way to add headers to the Response of generic views. The different mixins create their own Response instance, and have no way to add headers. I might be looking in the wrong place?
Concretely, I would like to add Link headers. Issue #403 mentions this should be possible using third-party code, but I cannot find a way to add them.
If this is not possible, I was thinking about two options:
GenericAPIView
for adding headers.response_class
for using a subclass ofResponse
that would contain the magic, á la Missing (?) Location and Link Header #403.Beta Was this translation helpful? Give feedback.
All reactions