Removed unsafe headers and content-type to JSON.
Missed layout.getContentType().

Reverted JSON.
Application JSON.
Merge pull request #2 from hemanth/patch-1

Corrected Content-Type. Many thanks @hemanth for the patch.