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.
1 2 3 4 5 | response = nil Net:: HTTP .start( 'some.www.server' , 80 ) {|http| response = http.head( '/index.html' ) } p response[ 'content-type' ] |
Please login to continue.