Sha256: 98edb51ed038f052dfd313671864041e9c5c70aad5737438bcefbcab4d0d0b99

Contents?: true

Size: 616 Bytes

Versions: 3

Compression:

Stored size: 616 Bytes

Contents

__DIR__ = File.dirname(__FILE__)

$LOAD_PATH.unshift __DIR__ unless
  $LOAD_PATH.include?(__DIR__) ||
  $LOAD_PATH.include?(File.expand_path(__DIR__))

require 'openssl'
require 'socket'
require 'uri'

require 'excon/connection'
require 'excon/errors'
require 'excon/response'

module Excon

  CHUNK_SIZE = 1048576 # 1 megabyte

  def self.new(url)
    Excon::Connection.new(url)
  end

  %w{connect delete get head options post put trace}.each do |method|
    eval <<-DEF
      def self.#{method}(url, params = {})
        new(url).request(params.merge!(:method => '#{method.upcase}'))
      end
    DEF
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
excon-0.0.21 lib/excon.rb
excon-0.0.20 lib/excon.rb
excon-0.0.19 lib/excon.rb