I am trying to get to the internal testing API server using RestClient and Ruby v. 2.2.1.
This is essentially the code:
url = "https://10.10.0.10/thing/i/want/to/get"
header = {
:content_type => "application/json",
:"x-auth-token" => "testingtoken"
}
response = RestClient.get url, header
This is the error message I get:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (RestClient::SSLCertificateNotVerified)
If I read this right, it looks like Ruby was unable to accept the SSL security certificate. This call works in the Postman application for Chrome, but for it to work, I have to click the URL in Chrome itself and accept that the connection is not safe (but still), and THEN it will work in the postman.
Is there a way to ignore certificate errors and continue anyway in Ruby?
source
share