I am getting OpenSSL::SSL::SSLError while making one http_request. Please find the code mentioned below.
require 'net/http'
uri = URI.parse("http://webaddress.com")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new("/v1.1/auth")
request.add_field('Content-Type', 'application/json')
request.body = {"auth_token"=>"abcd" ,"employee" => {"method" => "add_employee"}}
response = http.request(request)
It's throwing following error :
SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
Please let me know why this error is coming? and what could be the reason for this error.