REST: Optimize 'withFormat' method and existing mimetypes APIs