Sha256: 51c6ba6743629e2b5d835d4b252ecf11661998e5123d90af3eb63f7ed86e78fb
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) require 'cgi' require 'openssl' require 'socket' require 'uri' require 'excon/connection' require 'excon/errors' require 'excon/response' module Excon unless const_defined?(:VERSION) VERSION = '0.3.5' end unless const_defined?(:CHUNK_SIZE) CHUNK_SIZE = 1048576 # 1 megabyte end # @see Connection#initialize # Initializes a new keep-alive session for a given remote host # # @param [String] url The destination URL # @param [Hash<Symbol, >] params One or more option params to set on the Connection instance # @return [Connection] A new Excon::Connection instance def self.new(url, params = {}) Excon::Connection.new(url, params) end %w{connect delete get head options post put trace}.each do |method| eval <<-DEF def self.#{method}(url, params = {}, &block) new(url).request(params.merge!(:method => :#{method}), &block) end DEF end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
excon-0.3.5 | lib/excon.rb |