Public Class methods
new(form)
[show source]
# File lib/httpx/transcoder/form.rb 25 def initialize(form) 26 @raw = form.each_with_object("".b) do |(key, val), buf| 27 HTTPX::Transcoder.normalize_keys(key, val) do |k, v| 28 buf << "&" unless buf.empty? 29 buf << URI.encode_www_form_component(k) 30 buf << "=#{URI.encode_www_form_component(v.to_s)}" unless v.nil? 31 end 32 end 33 end
Public Instance methods
content_type()
[show source]
# File lib/httpx/transcoder/form.rb 35 def content_type 36 "application/x-www-form-urlencoded" 37 end