Method: Handsoap::Http::Part#charset

Defined in:
lib/handsoap/http/part.rb

#charsetObject

Returns the charset part of the content-type header



30
31
32
33
34
35
36
37
# File 'lib/handsoap/http/part.rb', line 30

def charset
  if @headers['content-type']
    match_data = @headers['content-type'].first.match(/^[^;]+; charset=([^;]+)/)
    if match_data
      match_data[1].to_s
    end
  end
end