don't send http headers before returning the json data, include it in the returned data