Sha256: b8ee33d0c3db0e1542185f683d818bfcf5340b9c4cbf4e5754dfd4c56ef3c4df

Contents?: true

Size: 560 Bytes

Versions: 3

Compression:

Stored size: 560 Bytes

Contents

require 'uri'
require 'aws-sdk'

module URI
  def self.seahorse_encode_www_form(params)
    params.map {|key, value|
      encoded_key = encode_www_form_component(key)

      if value.nil?
        encoded_key
      elsif value.respond_to?(:to_ary)
        value.to_ary.map {|v|
          if v.nil?
            # bug?
            #encoded_key
          else
            encoded_key + '=' + Seahorse::Util.uri_escape(v)
          end
        }.join('&')
      else
        encoded_key + '=' + Seahorse::Util.uri_escape(value)
      end
    }.join('&')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
faraday_middleware-aws-signers-v4-0.1.6 lib/faraday_middleware/ext/uri_ext.rb
faraday_middleware-aws-signers-v4-0.1.5 lib/faraday_middleware/ext/uri_ext.rb
faraday_middleware-aws-signers-v4-0.1.4 lib/faraday_middleware/ext/uri_ext.rb