当前位置:网站首页>解决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"
}
});
可以成功发送。
边栏推荐
- Ten thousand word summary data storage, three knowledge points
- Do you have to make money in the account to open an account? Is the fund safe?
- [200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)
- Meta force force meta universe system development fossage model
- Codeforces round 296 (Div. 2) A. playing with paper[easy to understand]
- I have to use my ID card to open an account. Is the bank card safe? I don't understand it
- Tupu digital twin coal mining system to create "hard power" of coal mining
- Backup tidb cluster to persistent volume
- awk处理JSON处理
- FatMouse' Trade(杭电1009)
猜你喜欢

Use camunda to do workflow design and reject operations

Details of C language integer and floating-point data storage in memory (including details of original code, inverse code, complement, size end storage, etc.)

Solve the problem of using uni app mediaerror mediaerror errorcode -5
Lex & yacc of Pisa proxy SQL parsing

【OpenCV 例程200篇】223. 特征提取之多边形拟合(cv.approxPolyDP)
SQL injection error report injection function graphic explanation
Default constraint and zero fill constraint of MySQL constraint
Klocwork code static analysis tool

ISO 26262 - considerations other than requirements based testing

Static analysis of software defects codesonar 5.2 release
随机推荐
openGl超级宝典学习笔记 (1)第一个三角形「建议收藏」
FatMouse' Trade (Hangdian 1009)
easyui 日期控件清空值
Deployment, recall and deletion solutions - stsadm and PowerShell "suggestions collection"
【OpenCV 例程200篇】223. 特征提取之多边形拟合(cv.approxPolyDP)
I have to use my ID card to open an account. Is the bank card safe? I don't understand it
GridView defines its own time for typesetting "suggestions collection"
Can Huatai Securities achieve Commission in case of any accident? Is it safe to open an account
浅解ARC中的 __bridge、__bridge_retained和__bridge_transfer
Guava multithreading, futurecallback thread calls are uneven
Contour layout of margin
Lex & yacc of Pisa proxy SQL parsing
Object-C programming tips timer "suggestions collection"
[uvalive 6663 count the regions] (DFS + discretization) [easy to understand]
HOJ 2245 浮游三角胞(数学啊 )
POJ 3140 Contestants Division「建议收藏」
2022 how to evaluate and select low code development platforms?
Description of the difference between character varying and character in PostgreSQL database
恶魔奶爸 A3阶段 近常速语流初接触
Onespin | solve the problems of hardware Trojan horse and security trust in IC Design