patriciomacadden / hobbit

A minimalistic microframework built on top of Rack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How set 'Content-Type' => 'application/json'

sergeymild opened this issue · comments

How set 'Content-Type' => 'application/json'

Inside the route or a filter.

response["Content-Type"] = "application/json"

Thanks

Hey! I just saw this issue, sorry for not answering. Thanks @adam12 for answering so fast!

Not to raise the dead, but this should probably be mentioned on the front page, or in the wiki.
Also, shouldn't the build usage of http://www.rubydoc.info/github/rack/rack/Rack/ContentType work?