2013-11-06 02:15:09 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2012-10-12 12:45:51 +00:00
|
|
|
module MusicBrainz
|
|
|
|
module ClientModules
|
|
|
|
module TransparentProxy
|
|
|
|
def get_contents(url)
|
2013-01-20 12:36:52 +00:00
|
|
|
response = http.get(url)
|
|
|
|
{ body: response.body, status: response.status }
|
2013-07-13 10:26:57 +00:00
|
|
|
rescue Faraday::Error::ClientError
|
|
|
|
{ body: nil, status: 500 }
|
2012-10-12 12:45:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|