Class: MediaArtsDb::HttpBase
- Inherits:
-
Object
- Object
- MediaArtsDb::HttpBase
- Defined in:
- lib/media_arts_db/http_base.rb
Class Method Summary collapse
Class Method Details
.get(uri, query = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/media_arts_db/http_base.rb', line 7 def get(uri, query = nil) uri_obj = if query.nil? Addressable::URI.parse(uri) else template = Addressable::Template.new("#{uri}{?query*}") template.(query) end request(uri_obj) end |