Sha256: 5b20d48f74e759eed7cb441210fba643a5c396a5c2164f2829ee0d6450f69766
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.2.7' 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.2.7 | lib/excon.rb |