vue.js - vue - axios - ISO-8859-1 需要帮助(字符集)
问题描述
请帮助 vue + axios + ISO-8859-1。我通过 axios 向 json 文件发出请求并得到响应:
服务器以 ISO 8895-1 编码发送它,我无法更改它。如何使用 axios 在 vue 组件中以不同的编码获得输出?
mounted() {
axios
.get('http://example.com/status-json.xsl', {headers: {'Content-type': 'text/plain; charset=ISO-8859-1'}})
.then(response => (this.info = response.data.icestats.source.title))
.then(function (response) {console.log(response)});
},
我尝试更改/删除等
{headers: {'Content-type': 'text/plain; charset=ISO-8859-1'}}
解决方案
推荐阅读
- python - 不同窗口大小的熊猫分组滚动平均值 - 不同时期的移动平均值
- identityserver4 - 如何找出在 IdentityServer 中使用最佳流程?
- c# - Blazor 中的缓存标识帮助程序
- laravel - dynamodb 查询我试图使用 laravel 从 dynamodb 获取一些数据
- sql - 光标替换
- python - 虚拟环境使用 pip 版本 9 创建, pip --version 显示版本 20
- enterprise-architect - 有没有办法在 Sparx Enterprise Architect 中列出包的元素?
- swift - 加快 CI 上的 fastlane
- amazon-web-services - 具有多个用户的 AWS Sagemaker Notebook
- c - “大多数 C 系统提供逻辑上无限的浮点值”是什么意思?