Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

CGI#header

(?::String options) -> ::String
(?::Hash[::interned, untyped] header_hash) -> ::String
header(options='text/html')

Alias of #http_header

This method is an alias for http_header, when HTML5 tag maker is inactive.

NOTE: use http_header to create HTTP header blocks, this alias is only provided for backwards compatibility.

Using header with the HTML5 tag maker will create a <header> element.