Cannot make POST request

Posted March 19, 2021 571 views
NginxUbuntuPythonPython FrameworksUbuntu 20.04

I followed the exact same steps as mentioned in the tutorial. GET requests work both on browser and Postman but when I make a POST request using Postman it says method not allowed although I have defined a route for POST request in my flask app.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

What I could suggest is checking your Nginx error log for some more information on what the problem could be caused by:

tail -100 /var/log/nginx/error.log

Another thing that I could suggest is, if you have a domain name with an SSL certificate, make sure that you specify https:// in Postman as if you have a HTTP to HTTPS redirect it could cause that problem that you are seeing.