File get contents -ror
From Sandoz
(Difference between revisions)
Sandoz-admin (Talk | contribs) m (Protected "File get contents -ror" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))) |
Sandoz-admin (Talk | contribs) |
||
(One intermediate revision not shown) | |||
Line 1: | Line 1: | ||
response = Net::HTTP.get_response(URI.parse(url)).body | response = Net::HTTP.get_response(URI.parse(url)).body | ||
+ | |||
+ | html = open(url, "User-Agent" => getUseragent(), :proxy=>getProxy()) | ||
+ | |||
+ | |||
+ | headers = {'Accept-Encoding' => 'gzip', 'User-Agent' => 'MyDiscogsClient/1.0 +http://mydiscogsclient.org'} | ||
+ | |||
+ | check_nb_discogs_request_done() | ||
+ | response = open(url,headers) | ||
+ | response = response.read |
Latest revision as of 05:27, 14 February 2011
response = Net::HTTP.get_response(URI.parse(url)).body
html = open(url, "User-Agent" => getUseragent(), :proxy=>getProxy())
headers = {'Accept-Encoding' => 'gzip', 'User-Agent' => 'MyDiscogsClient/1.0 +http://mydiscogsclient.org'}
check_nb_discogs_request_done() response = open(url,headers) response = response.read