Method: ActionDispatch::Request#media_type
- Defined in:
- lib/action_dispatch/http/request.rb
#media_type ⇒ Object
The String MIME type of the request.
# get "/articles"
request.media_type # => "application/x-www-form-urlencoded"
292 293 294 |
# File 'lib/action_dispatch/http/request.rb', line 292 def media_type content_mime_type&.to_s end |