Method: HTTPX::ContentType#mime_type

Defined in:
lib/httpx/response.rb

#mime_typeObject

returns the mime type declared in the header.

ContentType.new("application/json; charset=utf-8").mime_type #=> "application/json"


221
222
223
224
225
226
227
# File 'lib/httpx/response.rb', line 221

def mime_type
  return @mime_type if @initialized

  load

  @mime_type
end