Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/HTTPS/Ruby/https.rb
Normal file
15
Task/HTTPS/Ruby/https.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
require 'net/https'
|
||||
require 'uri'
|
||||
require 'pp'
|
||||
|
||||
uri = URI.parse('https://sourceforge.net')
|
||||
http = Net::HTTP.new(uri.host,uri.port)
|
||||
http.use_ssl = true
|
||||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
|
||||
http.start do
|
||||
content = http.get(uri)
|
||||
p [content.code, content.message]
|
||||
pp content.to_hash
|
||||
puts content.body
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue