/usr/share/doc/ruby-httpclient/examples/cookie.rb is in ruby-httpclient 2.7.1-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/env ruby
$:.unshift(File.join('..', 'lib'))
require 'httpclient'
proxy = ENV['HTTP_PROXY']
clnt = HTTPClient.new(proxy)
clnt.set_cookie_store("cookie.dat")
clnt.debug_dev = STDOUT if $DEBUG
while urlstr = ARGV.shift
response = clnt.get(urlstr){ |data|
print data
}
p response.contenttype
end
clnt.save_cookie_store
|