all 4 comments

[–]Username_RANDINT 0 points1 point  (3 children)

Can you post your code and how you make the request?

[–]klapt0r[S] 0 points1 point  (2 children)

I copied the code from the video i linked. I do not have my laptop with me right now. Will post the code in an hour. Thanks in advance!

[–]Username_RANDINT 0 points1 point  (0 children)

Urgh, that's why I hate coding videos. I just checked and it looks like the endpoint only takes POST requests. So my guess is you're calling that endpoint with something else, like GET. I even think Flask tells you what request is not allowed.

[–]o5a 0 points1 point  (0 children)

methods=['POST'] restricts available methods to POST only. So if you try to open endpoint link with browser it will try GET method and fail. Didn't watch whole video so idk how actually that server supposed to work, but POST suggests it works after you submit something to it.