Im kind of new to Django Rest Framework. I know it is possible to post data using the Browsable API, I just don't know how. I have this simple view:
class ProcessBill(APIView):
def post(self, request):
bill_data = request.data
print(bill_data)
return Response("just a test", status=status.HTTP_200_OK)
When I go to the url that points to this view, I get the rest_framework browsable api view with the response from the server method not allowed which is understandable cause I am not setting a def get() method. But ... how can I POST the data? I was expecting a form of some kind somewhere.
EDIT
This is a screenshot of how the browsable API looks for me, it is in spanish. The view is the same I wrote above but in spanish. As you can see ... no form for POST data :/ .

Content. Can you share screenshot of how your browser window looks like? - Rohit Jainget_serializer_class()method orserializer_classattribute in your view. - Rohit Jainformatkwarg, but posting should generally work as far as I know. Have you tried to POST some data from command line (i.e. usingcurl?) to see if the server accepts it? - Geotob