配置ruby HTTPClient始终使用HTTPS

时间:2018-08-23 11:15:11

标签: ruby

如何始终配置Ruby HTTPClient以便与远程主机建立HTTPS连接。

request = HTTPClient.new()
request.ssl_config.clear_cert_store

request.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE 
request.set_auth('https://test.test.com/test', 'user', 'pass')

request_body = File.read("requests/xml/req.xml")

0 个答案:

没有答案