Class: Request
- Inherits:
-
Object
- Object
- Request
- Defined in:
- lib/smokey/request.rb
Instance Method Summary collapse
- #get(url, options = {}) ⇒ Object
-
#initialize(username, password) ⇒ Request
constructor
A new instance of Request.
- #post(url, parameters) ⇒ Object
Constructor Details
Instance Method Details
#get(url, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/smokey/request.rb', line 9 def get(url, ={}) begin .merge!({basic_auth: @auth}) response = HTTParty.get(url, ) @logger.log("info", "#{response.code} - #{response.}") rescue => e e.response end end |
#post(url, parameters) ⇒ Object
19 20 21 |
# File 'lib/smokey/request.rb', line 19 def post(url, parameters) # RestClient.post(url, parameters) end |