Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Net::HTTPHeader#content_type

content_type

Returns a content type string such as “text/html”. This method returns nil if Content-Type: header field does not exist.