Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
22 lines (17 sloc) 0.393 kB
#!/usr/bin/env ruby
# wcat for http-access2
# Copyright (C) 2001 TAKAHASHI Masayoshi
$:.unshift(File.join('..', 'lib'))
require 'httpclient'
if ENV['HTTP_PROXY']
h = HTTPClient.new(ENV['HTTP_PROXY'])
else
h = HTTPClient.new()
end
while urlstr = ARGV.shift
response = h.get(urlstr){ |data|
print data
}
p response.contenttype
p response.peer_cert if /^https/i =~ urlstr
end
Jump to Line
Something went wrong with that request. Please try again.