Class: Wes::Data::API::Request
- Inherits:
-
Object
- Object
- Wes::Data::API::Request
- Defined in:
- lib/wes/data/api/request.rb
Class Method Summary collapse
Class Method Details
.get(path) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/wes/data/api/request.rb', line 10 def get(path) connection.get do |r| r..timeout = TIMEOUT r.url complete_path(path) end end |
.post(path, options) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/wes/data/api/request.rb', line 17 def post(path, ) connection.post do |r| r.body = .to_json r.headers["Content-Type"] = "application/json" r..timeout = TIMEOUT r.url complete_path(path) end end |
.put(path, options) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/wes/data/api/request.rb', line 26 def put(path, ) connection.put do |r| r.body = .to_json r.headers["Content-Type"] = "application/json" r..timeout = TIMEOUT r.url complete_path(path) end end |