
如圖,url 如果換成下面的localhost就可以請求成功,并且正確獲取json資料,但是換成上面的https://xxxxx,會報以下錯誤
"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="https://bbs.csdn.net/recruitment/getRecruitment">GET /recruitment/getRecruitment</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.2.23 (Fedora) Server at xxxxxxxx.com.cn Port 80</address>
</body></html>
"
另外,如果我在網頁里鍵入https://xxxxxxxx.com.cn/recruitment/getRecruitment',能夠正常回傳json資料。
是不是說明服務器端沒問題?
只有在微信小程式里運行才會報錯。
后臺配置了request合法域名:https://xxxxxxxx.com.cn
前臺的“不檢驗合法域名,web-view,TLS版本以及Https證書”沒有勾選。
后臺用springboot+mybatis
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/255719.html
標籤:微信開發
下一篇:qt creator運行出現 AbI is incompatible,device supports abis:armeabi-v7a。
