api respond with application/json header if returning json data