head(path, initheader = nil)
Instance Public methods
Gets only the header from path on the connected-to host.
header is a Hash like {
'Accept' => '/', ⦠}.
This method returns a Net::HTTPResponse
object.
This method never raises an exception.
response = nil
Net::HTTP.start('some.www.server', 80) {|http|
response = http.head('/index.html')
}
p response['content-type']