Skip to content

APIView.headers type is missing #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sobolevn opened this issue Jul 3, 2020 · 5 comments · Fixed by #114
Closed

APIView.headers type is missing #76

sobolevn opened this issue Jul 3, 2020 · 5 comments · Fixed by #114
Labels
bug Something isn't working

Comments

@sobolevn
Copy link
Member

sobolevn commented Jul 3, 2020

This line show that there's headers field in APIView class: https://github.com/encode/django-rest-framework/blob/5ce237e00471d885f05e6d979ec777552809b3b1/rest_framework/views.py#L494

Currently it is missing.

Related #74 and #75

@sobolevn sobolevn added the bug Something isn't working label Jul 3, 2020
@Goldziher
Copy link
Member

Should be resolved, no?

@sobolevn
Copy link
Member Author

It is still Any. Let's keep it in case someone might fix them to be more specific later.

@MarcinWieczorek
Copy link
Contributor

default_response_headers is a Dict[str, str] as introduced in 9f49d5a. I think APIView.headers should be that too because of the default value. Those are HTTP headers which are text in the end and I'm not familiar with any usecases of passing anything but str to headers in django or drf.

@sobolevn
Copy link
Member Author

@MarcinWieczorek PRs are welcome!

@MarcinWieczorek
Copy link
Contributor

Sure, if you agree with that changing that to Dict[str, str] I'll do that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

3 participants