class Ant::Client::Format::URLEncodedFormat

Allows to send data url encoded as a regular http client.

Public Instance Methods

encode(data) click to toggle source
# File lib/ant/client/format/url_encoded.rb, line 18
def encode(data)
  data.map { |k, v| "#{k}=#{v}" }.join('&')
end
pack(data) click to toggle source
# File lib/ant/client/format/url_encoded.rb, line 10
def pack(data)
  {
    body: encode(data),
    headers: { 'Content-type' =>
               'application/x-www-form-urlencoded; charset=UTF-8' }
  }
end