当前位置:网站首页>解决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"
}
});
可以成功发送。
边栏推荐
- How can big state-owned banks break the anti fraud dilemma?
- Klocwork code static analysis tool
- Virtual machine network configuration in VMWare
- 死锁的产生条件和预防处理[通俗易懂]
- 开户必须往账户里面赚钱吗,资金安全吗?
- 2022年在启牛开中银股票的账户安全吗?
- Codeforces round 296 (Div. 2) A. playing with paper[easy to understand]
- SQL注入报错注入函数图文详解
- awk处理JSON处理
- [200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)
猜你喜欢

Implement secondary index with Gaussian redis

C语言多角度帮助你深入理解指针(1. 字符指针2. 数组指针和 指针数组 、数组传参和指针传参3. 函数指针4. 函数指针数组5. 指向函数指针数组的指针6. 回调函数)
![Is embedded system really safe? [how does onespin comprehensively solve the IC integrity problem for the development team]](/img/af/61b384b1b6ba46aa1a6011f8a30085.png)
Is embedded system really safe? [how does onespin comprehensively solve the IC integrity problem for the development team]

【OpenCV 例程200篇】223. 特征提取之多边形拟合(cv.approxPolyDP)
![[200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)](/img/1e/055df228853d9b464fc4bcbde0a7ee.png)
[200 opencv routines] 223 Polygon fitting for feature extraction (cv.approxpolydp)

Using enumeration to realize English to braille
Mysql子查询关键字的使用方式(exists)
MySQL约束之默认约束default与零填充约束zerofill

Onespin | solve the problems of hardware Trojan horse and security trust in IC Design

Static analysis of software defects codesonar 5.2 release
随机推荐
[C language] advanced pointer --- do you really understand pointer?
Demon daddy A1 speech listening initial challenge
部署、收回和删除解决方式—-STSADM和PowerShell「建议收藏」
Tensorflow2. How to run under x 1 Code of X
【矩阵乘】【NOI 2012】【cogs963】随机数生成器
Write a jump table
万字总结数据存储,三大知识点
Numerical method for solving optimal control problem (0) -- Definition
EasyUI date control emptying value
Deployment, recall and deletion solutions - stsadm and PowerShell "suggestions collection"
Use camunda to do workflow design and reject operations
Usage of MySQL subquery keywords (exists)
How to meet the dual needs of security and confidentiality of medical devices?
I wrote a markdown command line gadget, hoping to improve the efficiency of sending documents by garden friends!
Feature generation
[uvalive 6663 count the regions] (DFS + discretization) [easy to understand]
开户必须往账户里面赚钱吗,资金安全吗?
DataTable数据转换为实体
恶魔奶爸 B3 少量泛读,完成两万词汇量+
Use br to recover backup data on azure blob storage