使用postman测试APi的时候,因为系统需要在header部带上登录用户的信息,所以

如下:

然后测试报错如下:TypeError: Failed to execute 'fetch' on 'Window': Invalid value

原因:是因为在postman测试过程中,在头部使用中文没有办法解析,所以报错了

解决方法:可以将上面测试中的中文替换掉成英文,即可解决问题

==========================================

待解决问题:

如果header中必须使用username,而这个字段的值又恰好是中文不能改变,怎么办 ?

【postman】postman测试API报错如下:TypeError: Failed to execute 'fetch' on 'Window': Invalid value 对中文支持不好的更多相关文章

  1. Swagger请求报错:TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.

    TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body. 如下图 ...

  2. 解决 canvas 将图片转为base64报错: Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasEleme...

    问题描述 当用户点击分享按钮时,生成一张海报,可以保存图片分享到朋友圈,用户的图片是存储在阿里云的OSS,当海报完成后,执行.canvas.toDataURL("image/png" ...

  3. 真机测试,Xcode报错:process launch failed: Security

    解决办法:手机->通用->设备管理->信任开发商应用即可

  4. 【报错解决】Uncaught TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.

    项目开发日记-bug多多篇(2) 同时也是 实现一些功能(3) 真的痛苦,写一天代码遇到的bug够我写三天博客. 今天是为了做一个头像功能,具体说是用户上传头像文件并且预览的功能. <div c ...

  5. vue项目使用echarts按需引入实现地图动态显示效果时,报错:TypeError: Cannot read property 'dataToPoint' of undefined

    vue项目使用echarts按需引入实现地图动态显示效果时,报错:TypeError: Cannot read property 'dataToPoint' of undefined 借鉴了该大神的文 ...

  6. 在PHP5.4上使用Google翻译的API报错

    /********************************************************************** * 在PHP5.4上使用Google翻译的API报错 * ...

  7. python2.7运行selenium webdriver api报错Unable to find a matching set of capabilities

    在火狐浏览器33版本,python2.7运行selenium webdriver api报错:SessionNotCreatedException: Message: Unable to find a ...

  8. jquery3.1.1报错Uncaught TypeError: a.indexOf is not a function

    jquery3.1.1报错Uncaught TypeError: a.indexOf is not a function 使用1.9就没有问题,解决办法: 就是把写的代码中: $(window).lo ...

  9. python中读取json文件报错,TypeError:the Json object must be str, bytes or bytearray,not ‘TextIOWrapper’

    利用python中的json读取json文件时,因为错误使用了相应的方法导致报错:TypeError:the Json object must be str, bytes or bytearray,n ...

随机推荐

  1. JQuery根据字母检索元素并导航到指定位置

    介绍:类似于实现ios通讯录中右侧字母,快速导航到联系人的效果,如图: Html代码如下,分别是字母和港星名字的排序: <input type="text" id=" ...

  2. 忘记MySQL的root密码的解决方法

    经常会有朋友或者同事问起,MySQL 的 root 密码忘了,不知道改怎么办. 其实解决方法很简单,下面是详细的操作步骤. (1)修改配置文件my.cnf,在配置文件[mysqld]下添加skip-g ...

  3. [Pandas技巧] 如何把pandas dataframe对象或series对象转换成list

    import pandas as pd >>> df = pd.DataFrame({'a':[1,3,5,7,4,5,6,4,7,8,9], 'b':[3,5,6,2,4,6,7, ...

  4. GUI——AWT框架和容器,创建简单窗体

    GUI概述:GUI(Graphical User Interface)—图形化用户界面.用户和程序之间可以通过GUI能方便友好地进行交互,在Java语言中,JFC(Java Foundation Cl ...

  5. 【Luogu】P2774方格取数问题(最大点权独立集)

    题目链接 不知道为啥坠大点权独立集的做法跟最大权闭合图差不多? qwq 放个链接 #include<cstdio> #include<cstring> #include< ...

  6. IBM QMF下载

    官网下载页面: http://www-01.ibm.com/support/docview.wss?uid=swg27009383 官方BBS: https://w3-connections.ibm. ...

  7. py-faster-rcnn 的makefile.config 注意事项

    在配置py-faster-rcnn的过程中,我遇到一些问题,记录如下 py-faster-rcnn文件夹下面有一个caffe-fast-rcnn文件夹 这个过程中,我们需要编译caffe, rbgir ...

  8. CountDownLatch和CyclicBarrier 的用法

    CountDownLatch是减计数方式,计数==0时释放所有等待的线程:CyclicBarrier是加计数方式,计数达到构造方法中参数指定的值时释放所有等待的线程.CountDownLatch当计数 ...

  9. SpringBoot jackson传入List引起的坑

    一.jackson无法解析value为[]的json 当入参为{xxxx1:[1,2,3],xxxx2:[obj1,obj2,obj3]}时,springmvn controller接收入参写为Lon ...

  10. 5whys分析法在美团工程师中的实践

    转载美团博客:https://tech.meituan.com/5whys-method.html 前言 网站的质量和稳定性对于用户和公司来说至关重要,但是在网站的快速发展过程中,由于各种原因导致事故 ...