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/response/headers.rb,
lib/httparty/connection_adapter.rb,
lib/httparty/module_inheritable_attributes.rb
Overview
Defined Under Namespace
Modules: AllowedFormatsDeprecation, ClassMethods, HashConversions, ModuleInheritableAttributes
Classes: Basement, BasicObject, ConnectionAdapter, CookieHash, Parser, RedirectionTooDeep, Request, Response, ResponseError, UnsupportedFormat, UnsupportedURIScheme
Constant Summary
collapse
- VERSION =
"0.11.0"
Class Method Summary
collapse
const_missing
Class Method Details
.copy(*args, &block) ⇒ Object
516
517
518
|
# File 'lib/httparty.rb', line 516
def self.copy(*args, &block)
Basement.move(*args, &block)
end
|
.delete(*args, &block) ⇒ Object
508
509
510
|
# File 'lib/httparty.rb', line 508
def self.delete(*args, &block)
Basement.delete(*args, &block)
end
|
.get(*args, &block) ⇒ Object
492
493
494
|
# File 'lib/httparty.rb', line 492
def self.get(*args, &block)
Basement.get(*args, &block)
end
|
.head(*args, &block) ⇒ Object
520
521
522
|
# File 'lib/httparty.rb', line 520
def self.head(*args, &block)
Basement.head(*args, &block)
end
|
.included(base) ⇒ Object
30
31
32
33
34
35
36
37
|
# File 'lib/httparty.rb', line 30
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
|
.move(*args, &block) ⇒ Object
512
513
514
|
# File 'lib/httparty.rb', line 512
def self.move(*args, &block)
Basement.move(*args, &block)
end
|
.normalize_base_uri(url) ⇒ Object
477
478
479
480
481
482
483
484
485
486
|
# File 'lib/httparty.rb', line 477
def self.normalize_base_uri(url) normalized_url = url.dup
use_ssl = (normalized_url =~ /^https/) || (normalized_url =~ /:443\b/)
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
524
525
526
|
# File 'lib/httparty.rb', line 524
def self.options(*args, &block)
Basement.options(*args, &block)
end
|
.patch(*args, &block) ⇒ Object
500
501
502
|
# File 'lib/httparty.rb', line 500
def self.patch(*args, &block)
Basement.patch(*args, &block)
end
|
.post(*args, &block) ⇒ Object
496
497
498
|
# File 'lib/httparty.rb', line 496
def self.post(*args, &block)
Basement.post(*args, &block)
end
|
.put(*args, &block) ⇒ Object
504
505
506
|
# File 'lib/httparty.rb', line 504
def self.put(*args, &block)
Basement.put(*args, &block)
end
|