1***@qq.com
1***@qq.com
  • 发布:2020-11-26 12:21
  • 更新:2021-02-02 17:09
  • 阅读:1179

uniapp编译到安卓APP,http 请求content-type:application/json 会自己加上utf-8的后缀

分类:uni-app

编译到安卓,http post请求 content-type:application/json 会自己加上utf-8的后缀,导致服务端解析失败,
怎么去掉这个后缀

2020-11-26 12:21 负责人:DCloud_App_Array 分享
已邀请:
f***@foxmail.com

f***@foxmail.com

一样的问题。网上搜到解决方案:https://blog.csdn.net/weixin_44475487/article/details/109725829
但我不认为应该这么去做,这应该是和uniapp本身的请求有关系导致发送会带上这个东西。哪怕自己强制设置了
url: this.$baseUrl + '/login',
header: {
"Content-Type": "application/json"
}
也是无效的。

该问题目前已经被锁定, 无法添加新回复