Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

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.