[Django Rest Framework, try to call a specific header

I've got a view based on viewsets.ReadOnlyModelViewSet. All works fine when i call my API with my custom pagination. Now, I would like to implement a custom http header and call it with 'curl -I'. I know that is possible with Response(data, headers=[{'something': something}) Response documentation and :

-->> https://github.com/encode/django-rest-framework/blob/22d206c1e0dbc03840c4d190f7eda537c0f2010a/rest_framework/mixins.py#L35

However, when i try to write my header like that, my custom pagination disapears.

Is there a specific way to write headers with viewsets.ReadOnlyModelViewSet ?

Thanks for reading me !

Back to Top