https - 使用curl / httparty 忽略https的错误 ( SSL certificate problem: certificate has expired )
访问量: 1079
参考:https://stackoverflow.com/questions/24611640/curl-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate
对于curl:
使用 -k 参数即可。 例如 curl .... -k
对于httparty:
参考:https://stackoverflow.com/questions/20955177/how-do-i-make-httparty-ignore-ssl
require 'httparty'
HTTParty::Basement.default_options.update(verify: false)
HTTParty.get("#{@settings.api_ssl_server}#{url1}")
HTTParty.get("#{@settings.api_ssl_server}#{url2}")