当前位置:网站首页>解决uni-app中uni.request发送POST请求没有反应。
解决uni-app中uni.request发送POST请求没有反应。
2022-07-07 21:33:00 【No Bug】
首先在postman测试了可以发送请求并且接收到返回数据。

然后在uni-app使用uni.request发送POST请求就没有反应。
uni.request({
url: "http://1.14.142.212:8080/tobraille",
method: "POST",
data: {
text: "hello get",
language: "en-us"
}
});
经过一番查询知道了uni.request发送POST请求需要加上
header: {
'content-type': 'application/json;charset:utf-8'
}
加上之后
uni.request({
url: "http://1.14.142.212:8080/tobraille",
method: "POST",
header: {
'content-type': 'application/json;charset:utf-8'
},
data: {
text: "hello get",
language: "en-us"
}
});
可以成功发送。
边栏推荐
- Details of C language integer and floating-point data storage in memory (including details of original code, inverse code, complement, size end storage, etc.)
- 神兵利器——敏感文件发现工具
- [UVALive 6663 Count the Regions] (dfs + 离散化)[通俗易懂]
- 国家正规的股票交易app有哪些?使用安不安全
- 恶魔奶爸 A0 英文零基础的自我提升路
- Demon daddy B3 read extensively in a small amount, and completed 20000 vocabulary+
- 201215-03-19 - cocos2dx memory management - specific explanation "recommended collection"
- AADL inspector fault tree safety analysis module
- Deployment, recall and deletion solutions - stsadm and PowerShell "suggestions collection"
- 【函数递归】简单递归的5个经典例子,你都会吗?
猜你喜欢

C language helps you understand pointers from multiple perspectives (1. Character pointers 2. Array pointers and pointer arrays, array parameter passing and pointer parameter passing 3. Function point

Solve the problem of using uni app mediaerror mediaerror errorcode -5

万字总结数据存储,三大知识点

95年专注安全这一件事 沃尔沃未来聚焦智能驾驶与电气化领域安全
MySQL约束之默认约束default与零填充约束zerofill
MySQL storage expression error

恶魔奶爸 B3 少量泛读,完成两万词汇量+
SQL注入报错注入函数图文详解

Static analysis of software defects codesonar 5.2 release

The latest version of codesonar has improved functional security and supports Misra, c++ parsing and visualization
随机推荐
Unity3d 4.3.4f1 execution project
Intelligent software analysis platform embold
恶魔奶爸 A0 英文零基础的自我提升路
margin 等高布局
2022年在启牛开中银股票的账户安全吗?
Details of C language integer and floating-point data storage in memory (including details of original code, inverse code, complement, size end storage, etc.)
Cocos2d-x game archive [easy to understand]
Solve the problem of using uni app mediaerror mediaerror errorcode -5
Klocwork code static analysis tool
Lex & yacc of Pisa proxy SQL parsing
POJ 3140 Contestants Division「建议收藏」
Implement secondary index with Gaussian redis
npm uninstall和rm直接删除的区别
C语言多角度帮助你深入理解指针(1. 字符指针2. 数组指针和 指针数组 、数组传参和指针传参3. 函数指针4. 函数指针数组5. 指向函数指针数组的指针6. 回调函数)
恶魔奶爸 B3 少量泛读,完成两万词汇量+
Cocos2d-x 游戏存档[通俗易懂]
Implement secondary index with Gaussian redis
Goal: do not exclude yaml syntax. Try to get started quickly
easyui 日期控件清空值
An overview of the latest research progress of "efficient deep segmentation of labels" at Shanghai Jiaotong University, which comprehensively expounds the deep segmentation methods of unsupervised, ro