Module: MusicBrainz::ClientModules::TransparentProxy

Included in:
MusicBrainz::Client
Defined in:
lib/musicbrainz/client_modules/transparent_proxy.rb

Instance Method Summary collapse

Instance Method Details

#get_contents(url) ⇒ Object



5
6
7
8
9
10
# File 'lib/musicbrainz/client_modules/transparent_proxy.rb', line 5

def get_contents(url)
  response = http.get(url)
  { body: response.body, status: response.status }
rescue Faraday::Error::ClientError
  { body: nil, status: 500 }
end