Module: HTTParty
- Extended by:
- AllowedFormatsDeprecation
- Included in:
- Basement
- Defined in:
- lib/httparty/version.rb,
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
Overview
Defined Under Namespace
Modules: AllowedFormatsDeprecation, ClassMethods, ModuleInheritableAttributes
Classes: Basement, BasicObject, CookieHash, Parser, RedirectionTooDeep, Request, Response, UnsupportedFormat, UnsupportedURIScheme
Constant Summary
collapse
- Version =
'0.5.0'
Class Method Summary
collapse
const_missing
Class Method Details
.delete(*args) ⇒ Object
244
245
246
|
# File 'lib/httparty.rb', line 244
def self.delete(*args)
Basement.delete(*args)
end
|
.get(*args) ⇒ Object
232
233
234
|
# File 'lib/httparty.rb', line 232
def self.get(*args)
Basement.get(*args)
end
|
.head(*args) ⇒ Object
248
249
250
|
# File 'lib/httparty.rb', line 248
def self.head(*args)
Basement.head(*args)
end
|
.included(base) ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'lib/httparty.rb', line 27
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
217
218
219
220
221
222
223
224
225
226
|
# File 'lib/httparty.rb', line 217
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
252
253
254
|
# File 'lib/httparty.rb', line 252
def self.options(*args)
Basement.options(*args)
end
|
.post(*args) ⇒ Object
236
237
238
|
# File 'lib/httparty.rb', line 236
def self.post(*args)
Basement.post(*args)
end
|
.put(*args) ⇒ Object
240
241
242
|
# File 'lib/httparty.rb', line 240
def self.put(*args)
Basement.put(*args)
end
|