Project

General

Profile

Bug #19017 » http.rb

https client - joshc (Josh C), 09/22/2022 08:51 PM

 
require 'net/https'

OpenSSL.debug = true

http = Net::HTTP.new('pluto', 8888, nil, nil, nil, nil)
http.set_debug_output($stderr)
http.ca_file = './ca.pem'
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.start do
headers = {
'Accept-Encoding' => 'identity',
'Connection' => 'keep-alive',
'Content-Type' => 'text/plain'
}
http.post('/', '', headers)
http.post('/', '', headers)
end
(2-2/4)