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=(type, params = {})

Alias of #set_content_type

Sets the content type in an HTTP header. The type should be a full HTTP content type, e.g. “text/html”. The params are an optional Hash of parameters to add after the content type, e.g. {‘charset’ => ‘iso-8859-1’}