前端
骑鱼的猫咪
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ubuntu 安装 nodejs12
执行下面的命令: sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt install nodejs 查看版本: node -v npm -v原创 2020-08-21 16:29:38 · 3412 阅读 · 1 评论 -
模拟a标签实现带header的下载
function handleDownLoad() { fetch('xxxx', { method: 'GET', headers: new Headers({ //自己加的头信息全都要转成string id: xxxx.toString(), 'ACCESS-TOKEN': window.localStorage...原创 2020-02-13 15:34:13 · 12053 阅读 · 4 评论 -
前端报错:Failed to execute 'setRequestHeader' on 'XMLHttpRequest': Value is not a valid ByteString.
报错详细: Unhandled Rejection (TypeError): Failed to execute 'setRequestHeader' on 'XMLHttpRequest': Value is not a valid ByteString. 报错原因: 是请求头中存在汉字 解决方案: 我们前段可以使用Base64进行编码encodeURI...原创 2020-01-02 17:19:14 · 7929 阅读 · 0 评论
分享