当前位置:网站首页>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 .
边栏推荐
- 201215-03-19 - cocos2dx memory management - specific explanation "recommended collection"
- Demon daddy B2 breaks through grammar and completes orthodox oral practice
- Wechat official account oauth2.0 authorizes login and displays user information
- 2022 how to evaluate and select low code development platforms?
- UVA 12230 – crossing rivers (probability) "suggested collection"
- 智能交通焕发勃勃生机,未来会呈现哪些巨变?[通俗易懂]
- MySQL约束之默认约束default与零填充约束zerofill
- ISO 26262 - considerations other than requirements based testing
- Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)
- South China x99 platform chicken blood tutorial
猜你喜欢
解决uni-app中uni.request发送POST请求没有反应。
MySQL约束之默认约束default与零填充约束zerofill
MySQL storage expression error
Onespin | solve the problems of hardware Trojan horse and security trust in IC Design
Ad domain group policy management
cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘
The latest version of codesonar has improved functional security and supports Misra, c++ parsing and visualization
SQL injection error report injection function graphic explanation
Goal: do not exclude yaml syntax. Try to get started quickly
The maximum number of meetings you can attend [greedy + priority queue]
随机推荐
智能交通焕发勃勃生机,未来会呈现哪些巨变?[通俗易懂]
cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘
OpenGL super classic learning notes (1) the first triangle "suggestions collection"
Is it safe to open an account online now? I want to know where I can open an account in Nanning now?
Feature generation
margin 等高布局
特征生成
Default constraint and zero fill constraint of MySQL constraint
Open source OA development platform: contract management user manual
object-c编程tips-timer「建议收藏」
L2:ZK-Rollup的现状,前景和痛点
ISO 26262 - considerations other than requirements based testing
Demon daddy B3 read extensively in a small amount, and completed 20000 vocabulary+
HDU4876ZCC loves cards(多校题)
Is embedded system really safe? [how does onespin comprehensively solve the IC integrity problem for the development team]
Word inversion implements "suggestions collection"
权限不足
Hdu4876zcc love cards (multi check questions)
Unity3d 4.3.4f1 execution project
Unity3d 4.3.4f1执行项目