Module: HTTParty
- Included in:
- Basement
- Defined in:
- lib/httparty.rb,
lib/httparty/utils.rb,
lib/httparty/parser.rb,
lib/httparty/request.rb,
lib/httparty/version.rb,
lib/httparty/response.rb,
lib/httparty/exceptions.rb,
lib/httparty/decompressor.rb,
lib/httparty/request/body.rb,
lib/httparty/text_encoder.rb,
lib/httparty/logger/logger.rb,
lib/httparty/hash_conversions.rb,
lib/httparty/response/headers.rb,
lib/httparty/headers_processor.rb,
lib/httparty/response_fragment.rb,
lib/httparty/connection_adapter.rb,
lib/httparty/logger/curl_formatter.rb,
lib/httparty/logger/apache_formatter.rb,
lib/httparty/logger/logstash_formatter.rb,
lib/httparty/request/multipart_boundary.rb,
lib/httparty/module_inheritable_attributes.rb
Overview
Defined Under Namespace
Modules: ClassMethods, HashConversions, Logger, ModuleInheritableAttributes, Utils
Classes: Basement, ConnectionAdapter, CookieHash, Decompressor, DuplicateLocationHeader, Error, HeadersProcessor, Parser, RedirectionTooDeep, Request, Response, ResponseError, ResponseFragment, TextEncoder, UnsupportedFormat, UnsupportedURIScheme
Constant Summary
collapse
- VERSION =
'0.22.0'
Class Method Summary
collapse
-
.build_request(*args, &block) ⇒ Object
-
.copy(*args, &block) ⇒ Object
-
.delete(*args, &block) ⇒ Object
-
.get(*args, &block) ⇒ Object
-
.head(*args, &block) ⇒ Object
-
.included(base) ⇒ Object
-
.move(*args, &block) ⇒ Object
-
.normalize_base_uri(url) ⇒ Object
-
.options(*args, &block) ⇒ Object
-
.patch(*args, &block) ⇒ Object
-
.post(*args, &block) ⇒ Object
-
.put(*args, &block) ⇒ Object
Class Method Details
.build_request(*args, &block) ⇒ Object
679
680
681
|
# File 'lib/httparty.rb', line 679
def self.build_request(*args, &block)
Basement.build_request(*args, &block)
end
|
.copy(*args, &block) ⇒ Object
667
668
669
|
# File 'lib/httparty.rb', line 667
def self.copy(*args, &block)
Basement.copy(*args, &block)
end
|
.delete(*args, &block) ⇒ Object
659
660
661
|
# File 'lib/httparty.rb', line 659
def self.delete(*args, &block)
Basement.delete(*args, &block)
end
|
.get(*args, &block) ⇒ Object
643
644
645
|
# File 'lib/httparty.rb', line 643
def self.get(*args, &block)
Basement.get(*args, &block)
end
|
.head(*args, &block) ⇒ Object
671
672
673
|
# File 'lib/httparty.rb', line 671
def self.head(*args, &block)
Basement.head(*args, &block)
end
|
.included(base) ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/httparty.rb', line 21
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
663
664
665
|
# File 'lib/httparty.rb', line 663
def self.move(*args, &block)
Basement.move(*args, &block)
end
|
.normalize_base_uri(url) ⇒ Object
628
629
630
631
632
633
634
635
636
637
|
# File 'lib/httparty.rb', line 628
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
675
676
677
|
# File 'lib/httparty.rb', line 675
def self.options(*args, &block)
Basement.options(*args, &block)
end
|
.patch(*args, &block) ⇒ Object
651
652
653
|
# File 'lib/httparty.rb', line 651
def self.patch(*args, &block)
Basement.patch(*args, &block)
end
|
.post(*args, &block) ⇒ Object
647
648
649
|
# File 'lib/httparty.rb', line 647
def self.post(*args, &block)
Basement.post(*args, &block)
end
|
.put(*args, &block) ⇒ Object
655
656
657
|
# File 'lib/httparty.rb', line 655
def self.put(*args, &block)
Basement.put(*args, &block)
end
|