diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zero/response.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/zero/response.rb b/lib/zero/response.rb index eec4559..0d23194 100644 --- a/lib/zero/response.rb +++ b/lib/zero/response.rb @@ -46,5 +46,12 @@ module Zero header['Content-Length'] = body.join.bytesize end + # Sets the content type to the given value + # Also creates it, if it does not exists + # + def content_type(value) + header['Content-Type'] = value + end + end end |