class HTTParty::TextEncoder

def charset

Experimental RBS support (using type sampling data from the type_fusion project).

def charset: () -> nil

This signature was generated using 1 sample from 1 application.

def charset
  return nil if content_type.nil?
  if (matchdata = content_type.match(/;\s*charset\s*=\s*([^=,;"\s]+)/i))
    return matchdata.captures.first
  end
  if (matchdata = content_type.match(/;\s*charset\s*=\s*"((\\.|[^\\"])+)"/i))
    return matchdata.captures.first.gsub(/\\(.)/, '\1')
  end
end