Read request response object of django n drf. They bother are different.

Use dir() on request object of drf and see which variable is available for
headers.

On Mon, Jul 8, 2019, 12:33 PM anil yadav <[email protected]> wrote:

> Hello,
>
> import requests
> I am not able to get custom header from API side
>
> url = "http://127.0.0.1:9090/api/router/";
>
> headers = {
>     'HTTP_MY': "qw",
>
>     'postman-token': "baa2316e-8058-321f-4fd2-920272903e21"
>     }
>
> response = requests.request("POST", url, headers=headers)
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-rest-framework/85a36d30-221f-4d69-a675-645e01e2c21b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-rest-framework/85a36d30-221f-4d69-a675-645e01e2c21b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/CAMKMUjv7EQmx0M%3D8yWXumaVdxmtMzHrgtk_yBXDFkU-y0s2E0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to