Returns the MIME type for the format used in
the request.
# GET /posts/5.xmlrequest.format# => Mime[:xml]# GET /posts/5.xhtmlrequest.format# => Mime[:html]# GET /posts/5request.format# => Mime[:html] or Mime[:js], or request.accepts.first
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 68
def format(_view_path = nil)
formats.first || Mime::NullType.instance
end