当前位置:网站首页>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 .
边栏推荐
- Unity3d 4.3.4f1 execution project
- [matrix multiplication] [noi 2012] [cogs963] random number generator
- Prometheus remote_ write InfluxDB,unable to parse authentication credentials,authorization failed
- 恶魔奶爸 A3阶段 近常速语流初接触
- How to integrate Google APIs with Google's application system (1) -introduction to Google APIs
- Do you have to make money in the account to open an account? Is the fund safe?
- 智能交通焕发勃勃生机,未来会呈现哪些巨变?[通俗易懂]
- 恶魔奶爸 B1 听力最后壁垒,一鼓作气突破
- Meta force force meta universe system development fossage model
- Contour layout of margin
猜你喜欢

ISO 26262 - considerations other than requirements based testing

Redis - basic use (key, string, list, set, Zset, hash, geo, bitmap, hyperloglog, transaction)

Intelligent software analysis platform embold

恶魔奶爸 B3 少量泛读,完成两万词汇量+

Magic weapon - sensitive file discovery tool

AADL inspector fault tree safety analysis module

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

Ubuntu安装mysql8遇到的问题以及详细安装过程

Validutil, "Rethinking the setting of semi supervised learning on graphs"

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
随机推荐
Static test tool
cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘
Backup tidb cluster to persistent volume
智能交通焕发勃勃生机,未来会呈现哪些巨变?[通俗易懂]
Devil daddy B1 hearing the last barrier, break through with all his strength
Onespin | solve the problems of hardware Trojan horse and security trust in IC Design
Prometheus remote_ write InfluxDB,unable to parse authentication credentials,authorization failed
Use br to back up tidb cluster data to azure blob storage
Contour layout of margin
The cyberspace office announced the measures for data exit security assessment, which will come into force on September 1
Hoj 2245 planktonic triangle cell (Mathematics)
Implement secondary index with Gaussian redis
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.)
Jetty:配置连接器[通俗易懂]
HOJ 2245 浮游三角胞(数学啊 )
SQL注入报错注入函数图文详解
恶魔奶爸 B3 少量泛读,完成两万词汇量+
POJ 3140 Contestants Division「建议收藏」
单词反转实现「建议收藏」