简体   繁体   English

Axios 给出错误:404(未找到)所有请求

[英]Axios giving error: 404 (not found) with all the requests

I'm working in vuejs, and using axios.我在 vuejs 工作,并使用 axios。 The axios is giving me the error 404 (not found) . axios 给我错误404 (not found) Banging my head around since 2 days and still cannot find the solution.从 2 天以来一直在敲我的头,但仍然找不到解决方案。 The following is the code for axios and the error.下面是axios的代码和报错。

在此处输入图片说明

在此处输入图片说明

Your URL is missing either a scheme ( http:// or https:// ) or the double slash ( // ) that indicates it should be resolved relative to the current scheme.您的 URL 缺少方案( http://https:// )或双斜杠( // ),表明它应该相对于当前方案进行解析。

Consequently, the IP address is taken as a relative path and the request is made to the same server for a path that doesn't exist.因此,IP 地址被视为相对路径,并且针对不存在的路径向同一服务器发出请求。

You can see this in the error message that tells you the 404 error is coming from http://localhost:8080/54.189.70.25/etc !您可以在错误消息中看到这一点,告诉您 404 错误来自http://localhost:8080/54.189.70.25/etc

Don't omit the scheme.不要省略该方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM