Request method 'POST' not supported]
时间: 2023-08-26 11:06:20 浏览: 148
http error code
5星 · 资源好评率100%
问题出现的原因是在登录Controller层中,当用户名或密码错误时再次跳转到login.html页面时,使用的是POST请求,而login.html页面不支持POST请求,所以报错"Request method 'POST' not supported"。因此,当再次跳转到login.html页面时,如果使用POST请求,login.html页面无法处理POST请求,导致报错。
解决这个问题的方法是,在再次跳转到login.html页面时,使用GET请求而不是POST请求。这样login.html页面就能正常处理请求,不会报错"Request method 'POST' not supported"。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [解决Request method 'POST' not supported问题](https://blog.csdn.net/qq_34868715/article/details/95938843)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [警告:Request method 'POST' not supported](https://blog.csdn.net/qq_32534441/article/details/85268388)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文