Module: HTTParty
- Extended by:
- AllowedFormatsDeprecation
- Included in:
- Basement
- Defined in:
- lib/httparty.rb,
lib/httparty/parser.rb,
lib/httparty/request.rb,
lib/httparty/version.rb,
lib/httparty/response.rb,
lib/httparty/exceptions.rb,
lib/httparty/core_extensions.rb,
lib/httparty/hash_conversions.rb,
lib/httparty/module_inheritable_attributes.rb
Overview
Defined Under Namespace
Modules: AllowedFormatsDeprecation, ClassMethods, HashConversions, ModuleInheritableAttributes
Classes: Basement, BasicObject, CookieHash, Parser, RedirectionTooDeep, Request, Response, ResponseError, UnsupportedFormat, UnsupportedURIScheme
Constant Summary
collapse
- VERSION =
"0.8.2"
Class Method Summary
collapse
const_missing
Class Method Details
.delete(*args, &block) ⇒ Object
438
439
440
|
# File 'lib/httparty.rb', line 438
def self.delete(*args, &block)
Basement.delete(*args, &block)
end
|
.get(*args, &block) ⇒ Object
426
427
428
|
# File 'lib/httparty.rb', line 426
def self.get(*args, &block)
Basement.get(*args, &block)
end
|
.head(*args, &block) ⇒ Object
442
443
444
|
# File 'lib/httparty.rb', line 442
def self.head(*args, &block)
Basement.head(*args, &block)
end
|
.included(base) ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'lib/httparty.rb', line 29
def self.included(base)
base.extend ClassMethods
base.send :include, HTTParty::ModuleInheritableAttributes
base.send(:mattr_inheritable, :default_options)
base.send(:mattr_inheritable, :default_cookies)
base.instance_variable_set("@default_options", {})
base.instance_variable_set("@default_cookies", CookieHash.new)
end
|
.normalize_base_uri(url) ⇒ Object
411
412
413
414
415
416
417
418
419
420
|
# File 'lib/httparty.rb', line 411
def self.normalize_base_uri(url) normalized_url = url.dup
use_ssl = (normalized_url =~ /^https/) || normalized_url.include?(':443')
ends_with_slash = normalized_url =~ /\/$/
normalized_url.chop! if ends_with_slash
normalized_url.gsub!(/^https?:\/\//i, '')
"http#{'s' if use_ssl}://#{normalized_url}"
end
|
.options(*args, &block) ⇒ Object
446
447
448
|
# File 'lib/httparty.rb', line 446
def self.options(*args, &block)
Basement.options(*args, &block)
end
|
.post(*args, &block) ⇒ Object
430
431
432
|
# File 'lib/httparty.rb', line 430
def self.post(*args, &block)
Basement.post(*args, &block)
end
|
.put(*args, &block) ⇒ Object
434
435
436
|
# File 'lib/httparty.rb', line 434
def self.put(*args, &block)
Basement.put(*args, &block)
end
|