Set correct data-type based on the Content-Type header set by the app