Ruby 3.4 リファレンスマニュアル

instance method WEBrick::HTTPResponse#content_type

content_type -> String | nil[permalink][rdoc][edit]

Content-Type ヘッダの値を返します。