sailorproject / sailor

A Lua MVC Web Framework.
MIT License
921 stars 125 forks source link

How to set content-type header #99

Closed avichalp closed 8 years ago

avichalp commented 8 years ago

I want to send content-type: application/json in response headers for my json based API. Is there a way of doing it ?

Etiene commented 8 years ago

yes, what's your webserver? please try this inside an action.

page.r.content_type = 'application/json'
avichalp commented 8 years ago

@Etiene It worked. Thanks.

Etiene commented 8 years ago

Awesome! :D