when returning "json" data, set "application/json" header