The requested URL was not found on the server
生活随笔
收集整理的这篇文章主要介绍了
The requested URL was not found on the server
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
问题重现:
curl的时候带了了一个url,例如XXXX/api/resource
然后报错
The requested URL was not found on the server
原因是什么呢?
因为部署这个web框架的python文件中没有
类似于
@app.route('/api/resource', methods=['POST'])的语句以及相关处理函数。
从而导致客户端请求的时候找不到。
The requested URL was not found on the server
的意思其实是,客户端的请求中的url在服务器端的python文件中的@app.route()中找不到。
@app.route()这个东西其实有点类似于C语言中的case语句的味道,请求中附带的链接和括号中的值匹配时,就执行括号后面的相关语句。
总结
以上是生活随笔为你收集整理的The requested URL was not found on the server的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Error: no such colum
- 下一篇: Could not run curl-c