我的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