我的API調用在郵差中正常工作。但是,當我從揚鞭UI發送請求,它顯示了所有的請求「服務器沒有響應」:Swagger UI中爲什麼「服務器沒有響應」?
Response Body
no contentResponse Code
0Response Headers
{ "error": "no response from server" }
什麼可問題是,如何解決?
瀏覽器控制檯顯示這些錯誤:
Failed to load resource: net::ERR_CONNECTION_REFUSED
Uncaught TypeError: Cannot read property 'length' of undefined
at showStatus (index.js:24)
at showErrorStatus (index.js:24)
at error (index.js:607) at spec-converter.js:533
at Request.callback (index.js:24)
at Request.crossDomainError (index.js:24)
at XMLHttpRequest.xhr.onreadystatechange (index.js:24)
是您的服務器上啓用CORS?瀏覽器控制檯中是否有錯誤? – Helen
是無法加載資源:淨:: ERR_CONNECTION_REFUSED index.js:24遺漏的類型錯誤:在showStatus無法讀取的不確定 財產 '長度'(index.js:24) 在showErrorStatus(index.js:24) 在誤差(index.js:607) 在SPEC-converter.js:533 在Request.callback(index.js:24) 在Request.crossDomainError(index.js:24) 在XMLHttpRequest.xhr.onreadystatechange(索引.js文件:24) – Andranik