Check if your response is getting cached.

On Tue, Dec 11, 2018 at 4:03 AM Wanderley S <[email protected]> wrote:

> Hi, did you add permission_classes in your view or in your settings? If
> not I believe you sholud do something like:
> In your .views file:
>
> from rest_framework.permissions import IsAuthenticated
>
> Then inside your class:
>
> Class SomeAPIView(APIView):
>     permission_classes = (IsAuthenticated,)
> .... the rest o your class....
>
> Regards.
>
>
> Em Seg, 10 de dez de 2018 11:33, Akash utreja <[email protected]
> escreveu:
>
>> Hi, I am using built in token authentication of django but I am getting
>> weird error that some of my request got 200 and some of then got 401
>> unauthorized when  I run it on server same with localhost. Both request
>> have same token value I've checked multiple times.Can anyone tell what is
>> thing i am missing. please help me out here!
>> My request header is like Authorization: Token <token key>
>> Here is my settings.py file containing.
>> REST_FRAMEWORK = {
>> 'DEFAULT_AUTHENTICATION_CLASSES': (
>> 'rest_framework.authentication.TokenAuthentication',
>> )}
>> Thanks
>>
>> --
>> 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].
>> 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].
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Warm Regards,

Arbaz

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to