1
0
Fork 0
musicbrainz/lib/musicbrainz/client_modules/transparent_proxy.rb

14 lines
319 B
Ruby
Raw Normal View History

# -*- 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