Slim Framework: Method not allowed Method not allowed. Must be one of: POST

后端 未结 1 1895
清歌不尽
清歌不尽 2021-01-21 08:10

I\'m setting up a REST-server in PHP and want to allow the client to use an endpoint with different methods like GET, POST, PUT, DELETE, ... But there is a problem when I try ad

相关标签:
1条回答
  • 2021-01-21 09:04

    I have found the problem: It was not Postman and not my code. The problem was the URL entered in Postman: It was a http URL and the server has an automatic redirection to https. During this process the HTTP method just changed to GET instead of POST, PUT or anything else... Now changed the URL to https: It works fine now!

    0 讨论(0)
提交回复
热议问题