Forums

Unable to POST to my django web app

Hi, I created a web-app and when I ran it in local environment, it ran flawlessly. I hosted it here - https://ezpz4me.pythonanywhere.com/ . I am trying to post some data in this url- https://ezpz4me.pythonanywhere.com/create/ - I have chosen all of the options provided- application/json,application-xwwwform,multipart-form data and tried sending a test data like this-

{'item_name': 'Laptop', 'item_rating': '4/5', 'item_offers': '10% off', 'item_price': '59000', 'item_features': 'i7, 16gb ram'} {"item_name":"laptop"}

still it doesn't let me send the data and throws a serialization error, which is -

{ "item_name": [ "This field is required." ], "item_rating": [ "This field is required." ], "item_features": [ "This field is required." ] }.

I am not getting this error in postman or even in the browser when I send data in the same way.

Can someone provide me any insight on what I am doing wrong?

What is the code that you're using to do the POST?