Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenURI::Meta#content_type
() -> ::String
content_type
lib/open-uri.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/open-uri.rb, line 551
def content_type
type, *_ = content_type_parse
type || 'application/octet-stream'
end
returns “type/subtype” which is MIME Content-Type. It is downcased for canonicalization. Content-Type parameters are stripped.