当前位置:网站首页>解决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"
}
});
可以成功发送。
边栏推荐
- Implementation of mahout Pearson correlation
- Codeforces Round #296 (Div. 2) A. Playing with Paper[通俗易懂]
- Hdu4876zcc love cards (multi check questions)
- Is private equity legal in China? Is it safe?
- 华泰证券可以做到万一佣金吗,万一开户安全嘛
- [C language] advanced pointer --- do you really understand pointer?
- Le capital - investissement est - il légal en Chine? C'est sûr?
- Word inversion implements "suggestions collection"
- 私募基金在中國合法嗎?安全嗎?
- 2022年在启牛开中银股票的账户安全吗?
猜你喜欢
目标:不排斥 yaml 语法。争取快速上手
AADL inspector fault tree safety analysis module
How to meet the dual needs of security and confidentiality of medical devices?
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
[200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)
Demon daddy B3 read extensively in a small amount, and completed 20000 vocabulary+
The new version of onespin 360 DV has been released, refreshing the experience of FPGA formal verification function
SQL injection error report injection function graphic explanation
Ubuntu安装mysql8遇到的问题以及详细安装过程
Jenkins user rights management
随机推荐
How to choose fund products? What fund is suitable to buy in July 2022?
Codeforces 474 F. Ant colony
Do you have to make money in the account to open an account? Is the fund safe?
201215-03-19—cocos2dx内存管理–具体解释「建议收藏」
使用高斯Redis实现二级索引
恶魔奶爸 A1 语音听力初挑战
Cantata9.0 | new features
FatMouse' Trade (Hangdian 1009)
目标:不排斥 yaml 语法。争取快速上手
Micro service remote debug, nocalhost + rainbow micro service development second bullet
margin 等高布局
智能交通焕发勃勃生机,未来会呈现哪些巨变?[通俗易懂]
Codeforces Round #275 (Div. 2) C – Diverse Permutation (构造)[通俗易懂]
Write a jump table
解决使用uni-app MediaError MediaError ErrorCode -5
Actual combat: sqlserver 2008 Extended event XML is converted to standard table format [easy to understand]
死锁的产生条件和预防处理[通俗易懂]
Mysql子查询关键字的使用方式(exists)
OpenGL super classic learning notes (1) the first triangle "suggestions collection"
The latest version of codesonar has improved functional security and supports Misra, c++ parsing and visualization