当前位置:网站首页>Solve the problem of uni in uni app Request sent a post request without response.
Solve the problem of uni in uni app Request sent a post request without response.
2022-07-07 21:37:00 【No Bug】
First, in the postman It is tested that the request can be sent and the return data can be received .

And then in uni-app Use uni.request send out POST There is no response to the request .
uni.request({
url: "http://1.14.142.212:8080/tobraille",
method: "POST",
data: {
text: "hello get",
language: "en-us"
}
});
After some inquiry, I know uni.request send out POST Request needs to add
header: {
'content-type': 'application/json;charset:utf-8'
}
After adding
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"
}
});
Can be successfully sent .
边栏推荐
- Description of the difference between character varying and character in PostgreSQL database
- Implement secondary index with Gaussian redis
- easyui 日期控件清空值
- Qt编写物联网管理平台39-报警联动
- Usage of MySQL subquery keywords (exists)
- 智能交通焕发勃勃生机,未来会呈现哪些巨变?[通俗易懂]
- How to meet the dual needs of security and confidentiality of medical devices?
- How to meet the dual needs of security and confidentiality of medical devices?
- openGl超级宝典学习笔记 (1)第一个三角形「建议收藏」
- POJ 3140 contents division "suggestions collection"
猜你喜欢

NVR硬盘录像机通过国标GB28181协议接入EasyCVR,设备通道信息不显示是什么原因?

Open source OA development platform: contract management user manual

Ad domain group policy management

解决使用uni-app MediaError MediaError ErrorCode -5

cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘

Wechat official account oauth2.0 authorizes login and displays user information

Codesonar Webinar

How to meet the dual needs of security and confidentiality of medical devices?

你可曾迷茫?曾经的测试/开发程序员,懵懂的小菜C鸟升级......

Ten thousand word summary data storage, three knowledge points
随机推荐
Automatic classification of defective photovoltaic module cells in electronic images
How to meet the dual needs of security and confidentiality of medical devices?
Prometheus remote_ write InfluxDB,unable to parse authentication credentials,authorization failed
恶魔奶爸 指南帖——简易版
华泰证券可以做到万一佣金吗,万一开户安全嘛
JNI primary contact
POJ 3140 contents division "suggestions collection"
ISO 26262 - considerations other than requirements based testing
Usage of MySQL subquery keywords (exists)
Demon daddy B2 breaks through grammar and completes orthodox oral practice
MySQL storage expression error
Dry goods sharing | devaxpress v22.1 original help document download collection
单词反转实现「建议收藏」
95年专注安全这一件事 沃尔沃未来聚焦智能驾驶与电气化领域安全
[uvalive 6663 count the regions] (DFS + discretization) [easy to understand]
Can Huatai Securities achieve Commission in case of any accident? Is it safe to open an account
Details of C language integer and floating-point data storage in memory (including details of original code, inverse code, complement, size end storage, etc.)
Ad domain group policy management
解决使用uni-app MediaError MediaError ErrorCode -5
UVA 11080 – place the guards