Module: Jarvis::HTTPUtilities::ClassMethods
- Defined in:
- lib/jarvis/http_utilities.rb
Instance Method Summary collapse
- #decode_uri(str) ⇒ Object
- #delete(path, options = {}, &block) ⇒ Object
- #encode_uri(str) ⇒ Object
-
#get(path, options = {}, &block) ⇒ Object
HTTP Requests.
- #patch(path, options = {}, &block) ⇒ Object
- #post(path, options = {}, &block) ⇒ Object
- #put(path, options = {}, &block) ⇒ Object
Instance Method Details
#decode_uri(str) ⇒ Object
31 32 33 |
# File 'lib/jarvis/http_utilities.rb', line 31 def decode_uri(str) URI.decode(str) end |
#delete(path, options = {}, &block) ⇒ Object
23 24 25 |
# File 'lib/jarvis/http_utilities.rb', line 23 def delete(path, ={}, &block) Jarvis::API::Response.new HTTParty.delete(path, , &block) end |
#encode_uri(str) ⇒ Object
27 28 29 |
# File 'lib/jarvis/http_utilities.rb', line 27 def encode_uri(str) URI.encode(str) end |
#get(path, options = {}, &block) ⇒ Object
HTTP Requests
7 8 9 |
# File 'lib/jarvis/http_utilities.rb', line 7 def get(path, ={}, &block) Jarvis::API::Response.new HTTParty.get(path, , &block) end |
#patch(path, options = {}, &block) ⇒ Object
15 16 17 |
# File 'lib/jarvis/http_utilities.rb', line 15 def patch(path, ={}, &block) Jarvis::API::Response.new HTTParty.patch(path, , &block) end |