Skip to content

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

instance method

Net::HTTPHeader#set_content_type

set_content_type(type, params = {})

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’}

See also #range_length #set_field #range= #set_form also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0