Re: authenticate user on post request returns 403-regarding

2016-09-19 Thread sabari rangan
the view is @api_view(['POST']) def example(request): return Response({'usernmae': request.user.username},status=status.HTTP_200_OK) when i print the content of response object it shows b'{"detail":"CSRF Failed: CSRF cookie not set."}' it happens only when i set sessionid cookie in

Re: authenticate user on post request returns 403-regarding

2016-09-18 Thread James Schneider
On Sep 18, 2016 12:56 PM, "sabari rangan" wrote: > > i am using django.contrib.auth module for authentication system in my django rest framework app, when i post data i couldn't able to authenticate the user it return 403 response code . but during get request it works

authenticate user on post request returns 403-regarding

2016-09-18 Thread sabari rangan
i am using django.contrib.auth module for authentication system in my django rest framework app, when i post data i couldn't able to authenticate the user it return 403 response code . but during get request it works fine. i have attached the sessionid in cookies in both above. kindly help me