Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
set_content_type(type, params = {})
public
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’}
Show source
def set_content_type(type, params = {})
@header['content-type'] = [type + params.map{|k,v|"; #{k}=#{v}"}.join('')]
end