move content_type application/json to the before/do block