matt-42 / silicon

A high performance, middleware oriented C++14 http web framework please use matt-42/lithium instead
http://siliconframework.org
MIT License
1.72k stars 138 forks source link

Add `Content-Type: application/json` to response #51

Closed fnc12 closed 7 years ago

fnc12 commented 7 years ago

How to add a header Content-Type: application/json to response? Maybe it would be more logically to insert it implicitly?

matt-42 commented 7 years ago

You can do it manually, check here:

https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/C%2B%2B/silicon/techempower.hh#L47

Good suggestion, I'll insert it implicitely for procedures returning SIO objects.