Sha256: 160233006d99179f6b5d26b1d906df4ae54458d1ac8750dd030aeaa886bb88ac

Contents?: true

Size: 583 Bytes

Versions: 5

Compression:

Stored size: 583 Bytes

Contents

module Ethon
  class Easy
    module Http

      # This module contains logic about setting up a PUT body.
      module Putable
        # Set things up when form is provided.
        # Deals with multipart forms.
        #
        # @example Setup.
        #   put.set_form(easy)
        #
        # @param [ Easy ] easy The easy to setup.
        def set_form(easy)
          easy.url ||= url
          easy.upload = true
          form.escape = true
          easy.infilesize = form.to_s.bytesize
          easy.set_read_callback(form.to_s)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ethon-0.5.2 lib/ethon/easy/http/putable.rb
ethon-0.5.1 lib/ethon/easy/http/putable.rb
ethon-0.5.0 lib/ethon/easy/http/putable.rb
ethon-0.4.4 lib/ethon/easy/http/putable.rb
ethon-0.4.3 lib/ethon/easy/http/putable.rb