Module: HTTParty
- Extended by:
- AllowedFormatsDeprecation
- Included in:
- Basement
- Defined in:
- lib/httparty.rb,
lib/httparty/parser.rb,
lib/httparty/request.rb,
lib/httparty/response.rb,
lib/httparty/exceptions.rb,
lib/httparty/core_extensions.rb,
lib/httparty/module_inheritable_attributes.rb
Defined Under Namespace
Modules: AllowedFormatsDeprecation, ClassMethods, ModuleInheritableAttributes
Classes: Basement, BasicObject, CookieHash, Parser, RedirectionTooDeep, Request, Response, ResponseError, UnsupportedFormat, UnsupportedURIScheme
Constant Summary
collapse
- VERSION =
"0.5.2".freeze
- CRACK_DEPENDENCY =
"0.1.7".freeze
Class Method Summary
collapse
const_missing
Class Method Details
.delete(*args) ⇒ Object
321
322
323
|
# File 'lib/httparty.rb', line 321
def self.delete(*args)
Basement.delete(*args)
end
|
.get(*args) ⇒ Object
309
310
311
|
# File 'lib/httparty.rb', line 309
def self.get(*args)
Basement.get(*args)
end
|
.head(*args) ⇒ Object
325
326
327
|
# File 'lib/httparty.rb', line 325
def self.head(*args)
Basement.head(*args)
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
294
295
296
297
298
299
300
301
302
303
|
# File 'lib/httparty.rb', line 294
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) ⇒ Object
329
330
331
|
# File 'lib/httparty.rb', line 329
def self.options(*args)
Basement.options(*args)
end
|
.post(*args) ⇒ Object
313
314
315
|
# File 'lib/httparty.rb', line 313
def self.post(*args)
Basement.post(*args)
end
|
.put(*args) ⇒ Object
317
318
319
|
# File 'lib/httparty.rb', line 317
def self.put(*args)
Basement.put(*args)
end
|