Yeah I did whatever you said but still I'm facing the same issue, But same code is working in Httpie and POSTMAN.That's why I'm surprised.
On Tue, Feb 4, 2020 at 5:29 PM Kasper Laudrup <laud...@stacktrace.dk> wrote: > Hi Soumen, > > Did you read the rest of my answer past the first two lines? > > On 04/02/2020 12.50, Soumen Khatua wrote: > > My views.py file > > > > *def post(self, request,*args, **kwargs): > > """ > > Create a Job record > > :param format: Format of the Job records to return to > > :param request: Request object for creating Job records > > :return: Returns a Job record > > """ > > print("request.data:",request.data) > > serializer = JobSerializer(data = request.data) > > > > if serializer.is_valid(raise_exception = ValueError): > > serializer.save(recruiter = self.request.user) > > return Response(serializer.data, status = > > status.HTTP_201_CREATED) > > return Response(serializer.error_messages,status = > > status.HTTP_400_BAD_REQUEST)* > > * > > Try comparing the output where you output the request data between what > is written when using POSTMAN and what is written when using CURL. > > That should point you in the right direction. > > Kind regards, > > Kasper Laudrup > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/3801baee-5f6e-8866-b0a2-e281d2298f3c%40stacktrace.dk > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WbG%2BtfL3a45uxBrv0yqNAC4%3DWy0B%2Bas02W847R5bE2zmg%40mail.gmail.com.