背景:
Could not get any response
This seems to be like an error connecting to
http://test-icore-groupsale.pa18.com:39443/market/searchPrice/upload
.
Why this might have happened:
-
The server couldn't send a response:Ensure that the backend is working properly
-
SSL connections are being blocked:Fix this by importing SSL certificates in Chrome
-
Cookies not being sent:Use the Postman Interceptor extension
-
Request timeout:Change request timeout in Settings > General
使用postman的使用时,使用 http://test-icore-groupsale.pa18.com:39443/market/searchPrice/upload. 这个请求,总是会返回上述响应。 很明显出现上述问题,可以肯定是请求没有成功发送,服务器没有做出任何响应。问题不是出现在Controller层。可的是url路径错误,后来发现是https,不是http。
很明显一个问题,在测试环境的日志文件中打印的是http,但是postman请求却是https,url是不是把http转成https。
那么问题来了,如何把http转成https???
通过网上查询资料可能的方式如下:
1、nginx 给站点配置https , 可以配置部分http 和部分https
2、https并不是一种协议,http是。https是http然后在通信链路上安装了ssl (安全证书)。