Module: HTTParty
- 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/logger/logger.rb,
lib/httparty/hash_conversions.rb,
lib/httparty/response/headers.rb,
lib/httparty/connection_adapter.rb,
lib/httparty/logger/curl_formatter.rb,
lib/httparty/logger/apache_formatter.rb,
lib/httparty/module_inheritable_attributes.rb
Overview
Defined Under Namespace
Modules: ClassMethods, HashConversions, Logger, ModuleInheritableAttributes
Classes: Basement, ConnectionAdapter, CookieHash, DuplicateLocationHeader, Error, Parser, RedirectionTooDeep, Request, Response, ResponseError, UnsupportedFormat, UnsupportedURIScheme
Constant Summary
collapse
- VERSION =
"0.15.5"
Class Method Summary
collapse
Class Method Details
.copy(*args, &block) ⇒ Object
624
625
626
|
# File 'lib/httparty.rb', line 624
def self.copy(*args, &block)
Basement.copy(*args, &block)
end
|
.delete(*args, &block) ⇒ Object
616
617
618
|
# File 'lib/httparty.rb', line 616
def self.delete(*args, &block)
Basement.delete(*args, &block)
end
|
.get(*args, &block) ⇒ Object
600
601
602
|
# File 'lib/httparty.rb', line 600
def self.get(*args, &block)
Basement.get(*args, &block)
end
|
.head(*args, &block) ⇒ Object
628
629
630
|
# File 'lib/httparty.rb', line 628
def self.head(*args, &block)
Basement.head(*args, &block)
end
|
.included(base) ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'lib/httparty.rb', line 19
def self.included(base)
base.extend ClassMethods
base.send :include, 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
620
621
622
|
# File 'lib/httparty.rb', line 620
def self.move(*args, &block)
Basement.move(*args, &block)
end
|
.normalize_base_uri(url) ⇒ Object
585
586
587
588
589
590
591
592
593
594
|
# File 'lib/httparty.rb', line 585
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
632
633
634
|
# File 'lib/httparty.rb', line 632
def self.options(*args, &block)
Basement.options(*args, &block)
end
|
.patch(*args, &block) ⇒ Object
608
609
610
|
# File 'lib/httparty.rb', line 608
def self.patch(*args, &block)
Basement.patch(*args, &block)
end
|
.post(*args, &block) ⇒ Object
604
605
606
|
# File 'lib/httparty.rb', line 604
def self.post(*args, &block)
Basement.post(*args, &block)
end
|
.put(*args, &block) ⇒ Object
612
613
614
|
# File 'lib/httparty.rb', line 612
def self.put(*args, &block)
Basement.put(*args, &block)
end
|