关于axios特别说明request failed with status code 404
来源:互联网 发布:喀秋莎中文版软件下载 编辑:程序博客网 时间:2024/06/11 09:01
最近在写项目是出现了这样的错误样的一个错误
最开始我的解决方法是给他加上一个头,如我上篇文档写的也是可以解决的。(*代码如下)
let instance = axios.create({ headers: {'content-type': 'application/x-www-form-urlencoded'}, withCredentials: true })export const getname = params => { return instance.get('/portal/role/roles', {params: params}) }1
其实后来我发现不用这样去解决的,首先说明一下我这个项目有写假数据 通过Mock来写的
也正是应为这样才出现上面的问题
之后我在对接的说后把 // import Mock from './mock'
// Mock.bootstrap();
注释掉了就行了就不再出现那个问题
就成功了
希望可以帮助大家
阅读全文
0 0
- 关于axios特别说明request failed with status code 404
- The request failed with HTTP status 417: Expectation failed.
- the request failed with http status 401:unauthorized
- The request failed with HTTP status 401:Access Denied
- The request failed with HTTP status 401:Access Denied
- The request failed with HTTP status 401: Access Denied
- The request failed with HTTP status 401: Unauthorized
- 关于前台jsp页面Failed to load resource: the server responded with a status of 400 (Bad Request)
- Qt Windows 安装问题RtlWerpReportException failed with status code :-1073741823
- 有关Error - RtlWerpReportException failed with status code :-1073741823.的解决方法
- HTTP Status Code 说明
- Http Status code说明
- http request status code详解
- 关于使用springmvc时Failed to load resource: the server responded with a status of 400 (Bad Request)错误可能原因
- 关于使用springmvc时Failed to load resource: the server responded with a status of 400 (Bad Request)错误可能原因
- Web Service Error: “The request failed with HTTP status 401: Unauthorized.”
- Web Service Error: “The request failed with HTTP status 401: Unauthorized.”
- 调用webservice时报错The request failed with HTTP status 401: Access Denied. 的解决方案。
- mysql 遇到了Invalid default value for 'created_at'的错误
- Deadlock的一些总结
- Set_HashSet_TreeSet_小记
- 获取移动端设备的屏幕信息(简单适配iphoneX)
- Python 爬虫学习笔记三:多页内容爬取&内容分析及格式化
- 关于axios特别说明request failed with status code 404
- Linux Bridge实现
- iOS UILabel 文字 置顶/置底 实现
- 学习笔记之 高并发处理系统的理解
- 惠州“云博会”掀起观众观展热潮,相比前五届—— 智能制造“称霸”全场
- Android 线程的一点记录
- /*3.使用二维数组存储班上五个学生三门功课的考试成绩,要求输出每一个学生的总分、平均分、最高分、最低分。
- 1006. 换个格式输出整数 (15)
- 网页字体的放大与缩小